| 626 | } |
| 627 | |
| 628 | void ProcessVisionList() |
| 629 | { |
| 630 | if (!UpdateVision) |
| 631 | return; |
| 632 | |
| 633 | TransList = {}; |
| 634 | |
| 635 | for (const Player &player : Players) { |
| 636 | int id = player.getId(); |
| 637 | if (!VisionActive[id]) |
| 638 | continue; |
| 639 | Light &vision = VisionList[id]; |
| 640 | if (!player.plractive || !player.isOnActiveLevel()) { |
| 641 | DoUnVision(vision.position.tile, vision.radius); |
| 642 | VisionActive[id] = false; |
| 643 | continue; |
| 644 | } |
| 645 | if (vision.hasChanged) { |
| 646 | DoUnVision(vision.position.old, vision.oldRadius); |
| 647 | vision.hasChanged = false; |
| 648 | } |
| 649 | } |
| 650 | for (const Player &player : Players) { |
| 651 | int id = player.getId(); |
| 652 | if (!VisionActive[id]) |
| 653 | continue; |
| 654 | Light &vision = VisionList[id]; |
| 655 | MapExplorationType doautomap = MAP_EXP_SELF; |
| 656 | if (&player != MyPlayer) |
| 657 | doautomap = player.friendlyMode ? MAP_EXP_OTHERS : MAP_EXP_NONE; |
| 658 | DoVision( |
| 659 | vision.position.tile, |
| 660 | vision.radius, |
| 661 | doautomap, |
| 662 | &player == MyPlayer); |
| 663 | } |
| 664 | |
| 665 | UpdateVision = false; |
| 666 | } |
| 667 | |
| 668 | void lighting_color_cycling() |
| 669 | { |
no test coverage detected