… | |
… | |
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 | */ |
66 | void |
66 | void |
67 | clear_los (player *pl) |
67 | player::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. |
74 | static void |
74 | static void |
… | |
… | |
450 | update_los (object *op) |
450 | update_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); |