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.41 by root, Fri Dec 19 22:47:29 2008 UTC vs.
Revision 1.42 by root, Sat Dec 20 02:32:31 2008 UTC

62/* 62/*
63 * Clears/initialises the los-array associated to the player 63 * Clears/initialises the los-array associated to the player
64 * controlling the object. 64 * controlling the object.
65 */ 65 */
66void 66void
67clear_los (player *pl) 67player::clear_los (sint8 value)
68{ 68{
69 memset (pl->los, LOS_BLOCKED, sizeof (pl->los)); 69 memset (los, value, sizeof (los));
70} 70}
71 71
72// enqueue a single mapspace, but only if it hasn't 72// enqueue a single mapspace, but only if it hasn't
73// been enqueued yet. 73// been enqueued yet.
74static void 74static void
450update_los (object *op) 450update_los (object *op)
451{ 451{
452 if (QUERY_FLAG (op, FLAG_REMOVED)) 452 if (QUERY_FLAG (op, FLAG_REMOVED))
453 return; 453 return;
454 454
455 clear_los (op->contr); 455 op->contr->clear_los ();
456 456
457 if (QUERY_FLAG (op, FLAG_WIZ) /* ||XRAYS(op) */ ) 457 if (QUERY_FLAG (op, FLAG_WIZ) /* ||XRAYS(op) */ )
458 memset (op->contr->los, 0, sizeof (op->contr->los)); 458 memset (op->contr->los, 0, sizeof (op->contr->los));
459 else if (QUERY_FLAG (op, FLAG_BLIND)) /* player is blind */ 459 else if (QUERY_FLAG (op, FLAG_BLIND)) /* player is blind */
460 blinded_sight (op); 460 blinded_sight (op);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines