Fix build

This commit is contained in:
gsemaj 2024-10-27 00:39:49 -07:00
parent 83ba121f5f
commit 95181b1058
No known key found for this signature in database
GPG Key ID: 24B96BAA40497929

View File

@ -173,31 +173,37 @@ void Chunking::addEntityToChunks(std::set<Chunk*> chnks, const EntityRef ref) {
// notify this *player* of the existence of all visible Entities // notify this *player* of the existence of all visible Entities
if (ref.kind == EntityKind::PLAYER && other->isExtant()) { if (ref.kind == EntityKind::PLAYER && other->isExtant()) {
sPCAppearanceData pcData;
sNPCAppearanceData npcData;
sShinyAppearanceData eggData;
sTransportationAppearanceData busData;
switch(otherRef.kind) switch(otherRef.kind)
{ {
case EntityKind::PLAYER: case EntityKind::PLAYER:
sPCAppearanceData pcData = dynamic_cast<Player*>(other)->getAppearanceData(); pcData = dynamic_cast<Player*>(other)->getAppearanceData();
bufferAppearanceData(pcAppearances, pcData, MAX_PC_PER_AROUND); bufferAppearanceData(pcAppearances, pcData, MAX_PC_PER_AROUND);
break; break;
case EntityKind::SIMPLE_NPC: case EntityKind::SIMPLE_NPC:
sNPCAppearanceData npcData = dynamic_cast<BaseNPC*>(other)->getAppearanceData(); npcData = dynamic_cast<BaseNPC*>(other)->getAppearanceData();
bufferAppearanceData(npcAppearances, npcData, MAX_NPC_PER_AROUND); bufferAppearanceData(npcAppearances, npcData, MAX_NPC_PER_AROUND);
break; break;
case EntityKind::COMBAT_NPC: case EntityKind::COMBAT_NPC:
sNPCAppearanceData combatNpcData = dynamic_cast<CombatNPC*>(other)->getAppearanceData(); npcData = dynamic_cast<CombatNPC*>(other)->getAppearanceData();
bufferAppearanceData(npcAppearances, combatNpcData, MAX_NPC_PER_AROUND); bufferAppearanceData(npcAppearances, npcData, MAX_NPC_PER_AROUND);
break; break;
case EntityKind::MOB: case EntityKind::MOB:
sNPCAppearanceData mobData = dynamic_cast<Mob*>(other)->getAppearanceData(); npcData = dynamic_cast<Mob*>(other)->getAppearanceData();
bufferAppearanceData(npcAppearances, mobData, MAX_NPC_PER_AROUND); bufferAppearanceData(npcAppearances, npcData, MAX_NPC_PER_AROUND);
break; break;
case EntityKind::EGG: case EntityKind::EGG:
sShinyAppearanceData shinyData = dynamic_cast<Egg*>(other)->getShinyAppearanceData(); eggData = dynamic_cast<Egg*>(other)->getShinyAppearanceData();
bufferAppearanceData(shinyAppearances, shinyData, MAX_SHINY_PER_AROUND); bufferAppearanceData(shinyAppearances, eggData, MAX_SHINY_PER_AROUND);
break; break;
case EntityKind::BUS: case EntityKind::BUS:
sTransportationAppearanceData transportationData = dynamic_cast<Bus*>(other)->getTransportationAppearanceData(); busData = dynamic_cast<Bus*>(other)->getTransportationAppearanceData();
bufferAppearanceData(transportationAppearances, transportationData, MAX_TRANSPORTATION_PER_AROUND); bufferAppearanceData(transportationAppearances, busData, MAX_TRANSPORTATION_PER_AROUND);
break;
default:
break; break;
} }
} }
@ -267,6 +273,8 @@ void Chunking::removeEntityFromChunks(std::set<Chunk*> chnks, const EntityRef re
id = dynamic_cast<Bus*>(other)->id; id = dynamic_cast<Bus*>(other)->id;
bufferIdForDisappearance(transportationDisappearances, id, MAX_IDS_PER_AROUND_DEL - 1); bufferIdForDisappearance(transportationDisappearances, id, MAX_IDS_PER_AROUND_DEL - 1);
break; break;
default:
break;
} }
} }