MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / ProcessVisionList

Function ProcessVisionList

Source/lighting.cpp:628–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626}
627
628void 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
668void lighting_color_cycling()
669{

Callers 3

LoadGameFunction · 0.85
GameLogicFunction · 0.85
LoadGameLevelFunction · 0.85

Calls 4

DoUnVisionFunction · 0.85
DoVisionFunction · 0.85
isOnActiveLevelMethod · 0.80
getIdMethod · 0.65

Tested by

no test coverage detected