… | |
… | |
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 (affects_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]) |
… | |
… | |
2604 | |
2604 | |
2605 | // find old force, or create new one |
2605 | // find old force, or create new one |
2606 | object *force = force_find (shstr_noise_force); |
2606 | object *force = force_find (shstr_noise_force); |
2607 | |
2607 | |
2608 | if (force) |
2608 | if (force) |
2609 | force->speed = 1.f / 4; // patch old speed up |
2609 | force->speed_left = -1.f; // patch old speed up |
2610 | else |
2610 | else |
2611 | force_add (shstr_noise_force, 4); |
2611 | { |
2612 | } |
2612 | force = archetype::get (shstr_noise_force); |
2613 | |
2613 | |
|
|
2614 | force->slaying = shstr_noise_force; |
|
|
2615 | force->stats.food = 1; |
|
|
2616 | force->speed_left = -1.f; |
|
|
2617 | |
|
|
2618 | force->set_speed (1.f / 4.f); |
|
|
2619 | force->flag [FLAG_IS_USED_UP] = true; |
|
|
2620 | force->flag [FLAG_APPLIED] = true; |
|
|
2621 | |
|
|
2622 | insert (force); |
|
|
2623 | } |
|
|
2624 | } |
|
|
2625 | |