MCPcopy Create free account
hub / github.com/diasurgical/devilution / sync_monster_active

Function sync_monster_active

Source/sync.cpp:69–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69BOOL sync_monster_active(TSyncMonster *p)
70{
71 int i, m, ndx;
72 DWORD lru;
73
74 ndx = -1;
75 lru = 0xFFFFFFFF;
76
77 for (i = 0; i < nummonsters; i++) {
78 m = monstactive[i];
79 if (sync_word_6AA708[m] < lru && sgwLRU[m] < 0xFFFE) {
80 lru = sync_word_6AA708[m];
81 ndx = monstactive[i];
82 }
83 }
84
85 if (ndx == -1) {
86 return FALSE;
87 }
88
89 sync_monster_pos(p, ndx);
90 return TRUE;
91}
92
93void sync_monster_pos(TSyncMonster *p, int ndx)
94{

Callers 1

sync_all_monstersFunction · 0.85

Calls 1

sync_monster_posFunction · 0.85

Tested by

no test coverage detected