[WIP] Rename Entity.type -> Entity.kind

This commit is contained in:
gsemaj
2021-06-20 14:12:40 -04:00
committed by gsemaj
parent 258ff35e20
commit 7c5b9a8105
13 changed files with 40 additions and 40 deletions

View File

@@ -1226,7 +1226,7 @@ void TableData::flush() {
continue;
int x, y, z;
if (npc->type == EntityType::MOB) {
if (npc->kind == EntityType::MOB) {
Mob *m = (Mob*)npc;
x = m->spawnX;
y = m->spawnY;
@@ -1259,7 +1259,7 @@ void TableData::flush() {
int x, y, z;
std::vector<Mob*> followers;
if (npc->type == EntityType::MOB) {
if (npc->kind == EntityType::MOB) {
Mob* m = (Mob*)npc;
x = m->spawnX;
y = m->spawnY;
@@ -1271,7 +1271,7 @@ void TableData::flush() {
// add follower data to vector; go until OOB or until follower ID is 0
for (int i = 0; i < 4 && m->groupMember[i] > 0; i++) {
if (NPCManager::NPCs.find(m->groupMember[i]) == NPCManager::NPCs.end() || NPCManager::NPCs[m->groupMember[i]]->type != EntityType::MOB) {
if (NPCManager::NPCs.find(m->groupMember[i]) == NPCManager::NPCs.end() || NPCManager::NPCs[m->groupMember[i]]->kind != EntityType::MOB) {
std::cout << "[WARN] Follower with ID " << m->groupMember[i] << " not found; skipping\n";
continue;
}