| 103 | } |
| 104 | |
| 105 | BOOL sync_monster_active2(TSyncMonster *p) |
| 106 | { |
| 107 | int i, m, ndx; |
| 108 | DWORD lru; |
| 109 | |
| 110 | ndx = -1; |
| 111 | lru = 0xFFFE; |
| 112 | |
| 113 | for (i = 0; i < nummonsters; i++) { |
| 114 | if (sgnMonsters >= nummonsters) { |
| 115 | sgnMonsters = 0; |
| 116 | } |
| 117 | m = monstactive[sgnMonsters]; |
| 118 | if (sgwLRU[m] < lru) { |
| 119 | lru = sgwLRU[m]; |
| 120 | ndx = monstactive[sgnMonsters]; |
| 121 | } |
| 122 | sgnMonsters++; |
| 123 | } |
| 124 | |
| 125 | if (ndx == -1) { |
| 126 | return FALSE; |
| 127 | } |
| 128 | |
| 129 | sync_monster_pos(p, ndx); |
| 130 | return TRUE; |
| 131 | } |
| 132 | |
| 133 | void SyncPlrInv(TSyncHeader *pHdr) |
| 134 | { |
no test coverage detected