mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-01-02 16:00:18 +00:00
added a chunk sanity check
removed unneccesary include
This commit is contained in:
@@ -917,6 +917,11 @@ void NPCManager::eggPickup(CNSocket* sock, CNPacketData* data) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (egg->chunkPos != ChunkManager::grabChunk(plr->x, plr->y, plr->instanceID)) {
|
||||
std::cout << "[WARN] Player tried to open an egg from the other chunk?!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
int typeId = egg->appearanceData.iNPCType;
|
||||
if (EggTypes.find(typeId) == EggTypes.end()) {
|
||||
if (egg->npcClass != NPCClass::NPC_EGG) {
|
||||
|
||||
Reference in New Issue
Block a user