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.39 by root, Thu Dec 18 07:01:31 2008 UTC vs.
Revision 1.40 by root, Fri Dec 19 17:52:50 2008 UTC

328{ 328{
329 return b == LOS_BLOCKED ? b : min (b, l); 329 return b == LOS_BLOCKED ? b : min (b, l);
330} 330}
331 331
332sint8 332sint8
333los_brighten_blocked (sint8 b, sint8 l)
334{
335 return min (b, l);
336}
337
338sint8
339los_darken (sint8 b, sint8 l) 333los_darken (sint8 b, sint8 l)
340{ 334{
341 return max (b, l); 335 return max (b, l);
342} 336}
343 337
434 /* grant some vision to the player, based on the darklevel */ 428 /* grant some vision to the player, based on the darklevel */
435 /* for outdoor maps, ensure some mininum visibility radius */ 429 /* for outdoor maps, ensure some mininum visibility radius */
436 { 430 {
437 int light = clamp (MAX_DARKNESS - darklevel, op->map->outdoor ? 2 : 0, MAX_LIGHT_RADIUS); 431 int light = clamp (MAX_DARKNESS - darklevel, op->map->outdoor ? 2 : 0, MAX_LIGHT_RADIUS);
438 432
439 apply_light<los_brighten_blocked> (op, half_x, half_y, light, darkness [light + MAX_LIGHT_RADIUS]); 433 apply_light<los_brighten> (op, half_x, half_y, light, darkness [light + MAX_LIGHT_RADIUS]);
440 } 434 }
441 } 435 }
442 436
443 // possibly do 2nd pass for rare negative glow radii 437 // possibly do 2nd pass for rare negative glow radii
444 // for effect, those are always considered to be stronger than anything else 438 // for effect, those are always considered to be stronger than anything else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines