Remove Eggs::Eggs and rearrange Entity members a bit

This commit is contained in:
2021-03-22 17:53:46 +01:00
parent 22678fcfc2
commit 3325397d17
8 changed files with 68 additions and 58 deletions

View File

@@ -10,7 +10,6 @@
#include "Racing.hpp"
#include "Vendor.hpp"
#include "Abilities.hpp"
#include "Eggs.hpp"
#include <cmath>
#include <algorithm>
@@ -62,10 +61,6 @@ void NPCManager::destroyNPC(int32_t id) {
if (MobAI::Mobs.find(id) != MobAI::Mobs.end())
MobAI::Mobs.erase(id);
// remove from eggs
if (Eggs::Eggs.find(id) != Eggs::Eggs.end())
Eggs::Eggs.erase(id);
// finally, remove it from the map and free it
NPCs.erase(id);
delete entity;