added a condition to not send mob/egg _ENTER packet when it's HP is 0

This commit is contained in:
Kamil
2020-10-24 22:57:50 +02:00
committed by Gent
parent 674d5112f3
commit 859b24229a
2 changed files with 12 additions and 4 deletions

View File

@@ -150,6 +150,10 @@ void PlayerManager::addPlayerToChunks(std::vector<Chunk*> chunks, CNSocket* sock
// add npcs
for (int32_t id : chunk->NPCs) {
BaseNPC* npc = NPCManager::NPCs[id];
if (npc->appearanceData.iHP <= 0)
continue;
switch (npc->npcClass) {
case NPC_BUS:
INITSTRUCT(sP_FE2CL_TRANSPORTATION_ENTER, enterBusData);