Shard crash fixes

This commit is contained in:
gsemaj
2023-12-18 12:37:55 -05:00
parent b765821552
commit 21d280147c
4 changed files with 25 additions and 3 deletions

View File

@@ -16,8 +16,9 @@ EntityRef::EntityRef(CNSocket *s) {
EntityRef::EntityRef(int32_t i) {
id = i;
assert(NPCManager::NPCs.find(id) != NPCManager::NPCs.end());
kind = NPCManager::NPCs[id]->kind;
kind = EntityKind::INVALID;
if (NPCManager::NPCs.find(id) != NPCManager::NPCs.end())
kind = NPCManager::NPCs[id]->kind;
}
bool EntityRef::isValid() const {