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

Function SyncOneMonster

Source/sync.cpp:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22int sgnSyncPInv;
23
24void SyncOneMonster()
25{
26 for (size_t i = 0; i < ActiveMonsterCount; i++) {
27 int m = ActiveMonsters[i];
28 auto &monster = Monsters[m];
29 sgnMonsterPriority[m] = MyPlayer->position.tile.ManhattanDistance(monster.position.tile);
30 if (monster.activeForTicks == 0) {
31 sgnMonsterPriority[m] += 0x1000;
32 } else if (sgwLRU[m] != 0) {
33 sgwLRU[m]--;
34 }
35 }
36}
37
38void SyncMonsterPos(TSyncMonster &monsterSync, int ndx)
39{

Callers 1

sync_all_monstersFunction · 0.85

Calls 1

ManhattanDistanceMethod · 0.80

Tested by

no test coverage detected