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.209 by root, Thu Dec 18 05:13:38 2008 UTC vs.
Revision 1.210 by root, Fri Dec 19 22:47:30 2008 UTC

3203 3203
3204 /* only the viewable area the player sees is updated by LOS 3204 /* only the viewable area the player sees is updated by LOS
3205 * code, so we need to restrict ourselves to that range of values 3205 * code, so we need to restrict ourselves to that range of values
3206 * for any meaningful values. 3206 * for any meaningful values.
3207 */ 3207 */
3208 if (abs (dx) <= (pl->contr->ns->mapx / 2) && 3208 if (pl->contr->blocked_los (dx, dy) != LOS_BLOCKED)
3209 abs (dy) <= (pl->contr->ns->mapy / 2) &&
3210 !pl->contr->blocked_los[dx + (pl->contr->ns->mapx / 2)][dy + (pl->contr->ns->mapy / 2)])
3211 return 1; 3209 return 1;
3212 3210
3213 op = op->more; 3211 op = op->more;
3214 } 3212 }
3215 3213
3481 3479
3482 int dx, dy; 3480 int dx, dy;
3483 if (!adjacent_map (map, ns->current_map, &dx, &dy)) 3481 if (!adjacent_map (map, ns->current_map, &dx, &dy))
3484 return 0; 3482 return 0;
3485 3483
3486 x += dx - ns->current_x + ns->mapx / 2; 3484 x += dx - ns->current_x;
3487 y += dy - ns->current_y + ns->mapy / 2; 3485 y += dy - ns->current_y;
3488 3486
3489 if (!IN_RANGE_EXC (x, 0, ns->mapx) || !IN_RANGE_EXC (y, 0, ns->mapy))
3490 return 0;
3491
3492 return 100 - blocked_los [x][y]; 3487 return 100 - blocked_los (x, y);
3493} 3488}
3494 3489
3495void 3490void
3496player::infobox (const char *title, const char *msg, int color) 3491player::infobox (const char *title, const char *msg, int color)
3497{ 3492{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines