Move to new branch

Added comments

Added some comments and changed a variable name to be less ambiguous.
This commit is contained in:
EmosewaMC
2022-06-19 00:14:33 -07:00
parent ba5037300f
commit 9cf534dc0a
3 changed files with 41 additions and 35 deletions

View File

@@ -99,22 +99,6 @@ Entity::~Entity() {
m_Character->SaveXMLToDatabase();
}
if (IsPlayer()) {
Entity* zoneControl = EntityManager::Instance()->GetZoneControlEntity();
for (CppScripts::Script* script : CppScripts::GetEntityScripts(zoneControl)) {
script->OnPlayerExit(zoneControl, this);
}
std::vector<Entity*> scriptedActs = EntityManager::Instance()->GetEntitiesByComponent(COMPONENT_TYPE_SCRIPTED_ACTIVITY);
for (Entity* scriptEntity : scriptedActs) {
if (scriptEntity->GetObjectID() != zoneControl->GetObjectID()) { // Don't want to trigger twice on instance worlds
for (CppScripts::Script* script : CppScripts::GetEntityScripts(scriptEntity)) {
script->OnPlayerExit(scriptEntity, this);
}
}
}
}
CancelAllTimers();
CancelCallbackTimers();