| 1553 | } |
| 1554 | |
| 1555 | bool IsLightVisible(Object &light, int lightRadius) |
| 1556 | { |
| 1557 | #ifdef _DEBUG |
| 1558 | if (DisableLighting) |
| 1559 | return false; |
| 1560 | #endif |
| 1561 | |
| 1562 | for (const Player &player : Players) { |
| 1563 | if (!player.plractive) |
| 1564 | continue; |
| 1565 | |
| 1566 | if (!player.isOnActiveLevel()) |
| 1567 | continue; |
| 1568 | |
| 1569 | if (player.position.tile.WalkingDistance(light.position) < lightRadius + 10) { |
| 1570 | return true; |
| 1571 | } |
| 1572 | } |
| 1573 | |
| 1574 | return false; |
| 1575 | } |
| 1576 | |
| 1577 | void UpdateObjectLight(Object &light, int lightRadius) |
| 1578 | { |
no test coverage detected