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

Function SyncMonsterActive

Source/sync.cpp:53–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53bool SyncMonsterActive(TSyncMonster &monsterSync)
54{
55 int ndx = -1;
56 uint32_t lru = 0xFFFFFFFF;
57
58 for (size_t i = 0; i < ActiveMonsterCount; i++) {
59 int m = ActiveMonsters[i];
60 if (sgnMonsterPriority[m] < lru && sgwLRU[m] < 0xFFFE) {
61 lru = sgnMonsterPriority[m];
62 ndx = ActiveMonsters[i];
63 }
64 }
65
66 if (ndx == -1) {
67 return false;
68 }
69
70 SyncMonsterPos(monsterSync, ndx);
71 return true;
72}
73
74bool SyncMonsterActive2(TSyncMonster &monsterSync)
75{

Callers 1

sync_all_monstersFunction · 0.85

Calls 1

SyncMonsterPosFunction · 0.85

Tested by

no test coverage detected