Code:
for (int i = 0; i < size; i++) {
if ((plr.RebuildNPCList == false)
&& (plr.withinDistance(plr.npcList[i]) == true)) {
plr.npcList[i].updateNPCMovement(str);
plr.npcList[i].appendNPCUpdateBlock(updateBlock);
plr.npcList[plr.npcListSize++] = plr.npcList[i];
} else {
int id = plr.npcList[i].npcId;
plr.npcInListBitmap[id >> 3] &= ~(1 << (id & 7)); // clear the
// flag
str.writeBits(1, 1);
str.writeBits(2, 3); // tells client to remove this npc
// from list
}
}
its part of the npc update. i noticed in npchandler it uses
Code:
// for (int j = 1; j < server.playerHandler.maxPlayers; j++) {
// if (server.playerHandler.players[j] != null) {
// server.playerHandler.players[j].RebuildNPCList = true;
// }
//}
(not commented out) in the applydead method. it would originally cause npc's to flinch if its spawned(like and doesn't respawn), after i commented out it fixed the problem.. nothing seemed to change. kinda wierd.