Fix landing animation (#720)

This commit is contained in:
David Markowitz 2022-08-08 07:34:33 -07:00 committed by GitHub
parent 2d0faae759
commit dc960cb99c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,15 +36,6 @@ CharacterComponent::CharacterComponent(Entity* parent, Character* character) : C
m_CurrentActivity = 0; m_CurrentActivity = 0;
m_CountryCode = 0; m_CountryCode = 0;
m_LastUpdateTimestamp = std::time(nullptr); m_LastUpdateTimestamp = std::time(nullptr);
//Check to see if we're landing:
if (character->GetZoneID() != Game::server->GetZoneID()) {
m_IsLanding = true;
}
if (LandingAnimDisabled(character->GetZoneID()) || LandingAnimDisabled(Game::server->GetZoneID()) || m_LastRocketConfig.empty()) {
m_IsLanding = false; //Don't make us land on VE/minigames lol
}
} }
bool CharacterComponent::LandingAnimDisabled(int zoneID) { bool CharacterComponent::LandingAnimDisabled(int zoneID) {
@ -273,6 +264,17 @@ void CharacterComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
} else { } else {
m_TotalTimePlayed = 0; m_TotalTimePlayed = 0;
} }
if (!m_Character) return;
//Check to see if we're landing:
if (m_Character->GetZoneID() != Game::server->GetZoneID()) {
m_IsLanding = true;
}
if (LandingAnimDisabled(m_Character->GetZoneID()) || LandingAnimDisabled(Game::server->GetZoneID()) || m_LastRocketConfig.empty()) {
m_IsLanding = false; //Don't make us land on VE/minigames lol
}
} }
void CharacterComponent::UpdateXml(tinyxml2::XMLDocument* doc) { void CharacterComponent::UpdateXml(tinyxml2::XMLDocument* doc) {