… | |
… | |
1083 | if (pl) |
1083 | if (pl) |
1084 | if (pl->is_player () && (glow_radius || !QUERY_FLAG (pl, FLAG_NO_FIX_PLAYER))) |
1084 | if (pl->is_player () && (glow_radius || !QUERY_FLAG (pl, FLAG_NO_FIX_PLAYER))) |
1085 | { |
1085 | { |
1086 | pl->update_stats (); |
1086 | pl->update_stats (); |
1087 | |
1087 | |
1088 | if (glow_radius && pl->is_on_map () && pl->map->darkness) |
1088 | if (glow_radius && pl->is_on_map () && pl->map->darklevel () > 0) |
1089 | update_all_los (pl->map, pl->x, pl->y); |
1089 | update_all_los (pl->map, pl->x, pl->y); |
1090 | } |
1090 | } |
1091 | } |
1091 | } |
1092 | else if (map) |
1092 | else if (map) |
1093 | { |
1093 | { |
… | |
… | |
1165 | } |
1165 | } |
1166 | |
1166 | |
1167 | last = tmp; |
1167 | last = tmp; |
1168 | } |
1168 | } |
1169 | |
1169 | |
1170 | if (map->darkness && affects_los ()) |
1170 | if (affect_los () && map->darklevel () > 0) |
1171 | update_all_los (map, x, y); |
1171 | update_all_los (map, x, y); |
1172 | } |
1172 | } |
1173 | } |
1173 | } |
1174 | |
1174 | |
1175 | /* |
1175 | /* |
… | |
… | |
1447 | * be far away from this change and not affected in any way - |
1447 | * be far away from this change and not affected in any way - |
1448 | * this should get redone to only look for players within range, |
1448 | * this should get redone to only look for players within range, |
1449 | * or just updating the P_UPTODATE for spaces within this area |
1449 | * or just updating the P_UPTODATE for spaces within this area |
1450 | * of effect may be sufficient. |
1450 | * of effect may be sufficient. |
1451 | */ |
1451 | */ |
1452 | if (op->affects_los () && op->map->darkness) |
1452 | if (op->affects_los () && op->map->darklevel () > 0) |
1453 | { |
1453 | { |
1454 | op->ms ().invalidate (); |
1454 | op->ms ().invalidate (); |
1455 | update_all_los (op->map, op->x, op->y); |
1455 | update_all_los (op->map, op->x, op->y); |
1456 | } |
1456 | } |
1457 | |
1457 | |
… | |
… | |
1656 | |
1656 | |
1657 | adjust_weight (this, op->total_weight ()); |
1657 | adjust_weight (this, op->total_weight ()); |
1658 | |
1658 | |
1659 | inserted: |
1659 | inserted: |
1660 | /* reset the light list and los of the players on the map */ |
1660 | /* reset the light list and los of the players on the map */ |
1661 | if (op->glow_radius && is_on_map () && map->darkness) |
1661 | if (op->glow_radius && is_on_map () && map->darklevel () > 0) |
1662 | { |
1662 | { |
1663 | update_stats (); |
1663 | update_stats (); |
1664 | update_all_los (map, x, y); |
1664 | update_all_los (map, x, y); |
1665 | } |
1665 | } |
1666 | else if (type == PLAYER && !flag [FLAG_NO_FIX_PLAYER]) |
1666 | else if (type == PLAYER && !flag [FLAG_NO_FIX_PLAYER]) |