| 72 | } |
| 73 | |
| 74 | bool SyncMonsterActive2(TSyncMonster &monsterSync) |
| 75 | { |
| 76 | int ndx = -1; |
| 77 | uint32_t lru = 0xFFFE; |
| 78 | |
| 79 | for (size_t i = 0; i < ActiveMonsterCount; i++) { |
| 80 | if (sgnMonsters >= ActiveMonsterCount) { |
| 81 | sgnMonsters = 0; |
| 82 | } |
| 83 | int m = ActiveMonsters[sgnMonsters]; |
| 84 | if (sgwLRU[m] < lru) { |
| 85 | lru = sgwLRU[m]; |
| 86 | ndx = ActiveMonsters[sgnMonsters]; |
| 87 | } |
| 88 | sgnMonsters++; |
| 89 | } |
| 90 | |
| 91 | if (ndx == -1) { |
| 92 | return false; |
| 93 | } |
| 94 | |
| 95 | SyncMonsterPos(monsterSync, ndx); |
| 96 | return true; |
| 97 | } |
| 98 | |
| 99 | void SyncPlrInv(TSyncHeader *pHdr) |
| 100 | { |
no test coverage detected