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

Comparing deliantra/server/server/player.C (file contents):
Revision 1.100 by root, Sat Jan 20 22:09:55 2007 UTC vs.
Revision 1.101 by root, Mon Jan 29 16:11:48 2007 UTC

3539 pl->ranges[i] = 0; 3539 pl->ranges[i] = 0;
3540 if (pl->shoottype == i) 3540 if (pl->shoottype == i)
3541 pl->shoottype = range_none; 3541 pl->shoottype = range_none;
3542 } 3542 }
3543} 3543}
3544
3545sint8
3546player::visibility_at (maptile *map, int x, int y) const
3547{
3548 if (!ns)
3549 return 0;
3550
3551 int dx, dy;
3552 if (!adjacent_map (map, ns->current_map, &dx, &dy))
3553 return 0;
3554
3555 x += dx - ns->current_x + ns->mapx / 2;
3556 y += dy - ns->current_y + ns->mapy / 2;
3557
3558 if (!IN_RANGE_EXC (x, 0, ns->mapx) || !IN_RANGE_EXC (y, 0, ns->mapy))
3559 return 0;
3560
3561 return 100 - blocked_los [x][y];
3562}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines