ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/los.C
(Generate patch)

Comparing deliantra/server/common/los.C (file contents):
Revision 1.57 by root, Thu Jan 8 21:35:54 2009 UTC vs.
Revision 1.58 by root, Thu Jan 8 22:35:00 2009 UTC

397 /* grant some vision to the player, based on outside, outdoor, and darklevel */ 397 /* grant some vision to the player, based on outside, outdoor, and darklevel */
398 { 398 {
399 int light; 399 int light;
400 400
401 if (!op->map->outdoor) // not outdoor, darkness becomes light radius 401 if (!op->map->outdoor) // not outdoor, darkness becomes light radius
402 light = op->map->darkness; 402 light = MAX_DARKNESS - op->map->darkness;
403 else if (op->map->darkness > 0) // outdoor and darkness > 0 => use darkness as max radius 403 else if (op->map->darkness > 0) // outdoor and darkness > 0 => use darkness as max radius
404 light = lerp_rd (maptile::outdoor_darkness + 0, 0, MAX_DARKNESS, MAX_DARKNESS - op->map->darkness, 0); 404 light = lerp_rd (maptile::outdoor_darkness + 0, 0, MAX_DARKNESS, MAX_DARKNESS - op->map->darkness, 0);
405 else // outdoor and darkness <= 0 => start wide and decrease quickly 405 else // outdoor and darkness <= 0 => start wide and decrease quickly
406 light = lerp (maptile::outdoor_darkness + op->map->darkness, 0, MAX_DARKNESS, MAX_VISION, 2); 406 light = lerp (maptile::outdoor_darkness + op->map->darkness, 0, MAX_DARKNESS, MAX_VISION, 2);
407 407

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines