[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

@@ -257,13 +257,13 @@ static void stepNPCPathing() {
}
// skip if not simulating mobs
if (npc->type == EntityType::MOB && !MobAI::simulateMobs) {
if (npc->kind == EntityType::MOB && !MobAI::simulateMobs) {
it++;
continue;
}
// do not roam if not roaming
if (npc->type == EntityType::MOB && ((Mob*)npc)->state != MobState::ROAMING) {
if (npc->kind == EntityType::MOB && ((Mob*)npc)->state != MobState::ROAMING) {
it++;
continue;
}
@@ -279,7 +279,7 @@ static void stepNPCPathing() {
NPCManager::updateNPCPosition(npc->appearanceData.iNPC_ID, point.x, point.y, point.z, npc->instanceID, npc->appearanceData.iAngle);
// TODO: move walking logic into Entity stack
switch (npc->type) {
switch (npc->kind) {
case EntityType::BUS:
INITSTRUCT(sP_FE2CL_TRANSPORTATION_MOVE, busMove);
@@ -385,7 +385,7 @@ NPCPath* Transport::findApplicablePath(int32_t id, int32_t type, int taskID) {
void Transport::constructPathNPC(int32_t id, NPCPath* path) {
BaseNPC* npc = NPCManager::NPCs[id];
if (npc->type == EntityType::MOB)
if (npc->kind == EntityType::MOB)
((Mob*)(npc))->staticPath = true;
npc->loopingPath = path->isLoop;