isPlayer changes

Changed isPlayer to check for whether the entity has a character instead of checking system address of entity.
This commit is contained in:
EmosewaMC 2022-04-22 00:10:15 -07:00
parent e85cf466d4
commit 2e61839d93

View File

@ -1739,7 +1739,7 @@ void Entity::CancelAllTimers() {
}
bool Entity::IsPlayer() const {
return m_TemplateID == 1 && GetSystemAddress() != UNASSIGNED_SYSTEM_ADDRESS;
return m_TemplateID == 1 && GetCharacter() != nullptr;
}
void Entity::TriggerEvent(std::string eventID, Entity* optionalTarget) {