mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-11-03 22:21:59 +00:00 
			
		
		
		
	Fix landing animation (#720)
This commit is contained in:
		@@ -36,15 +36,6 @@ CharacterComponent::CharacterComponent(Entity* parent, Character* character) : C
 | 
			
		||||
	m_CurrentActivity = 0;
 | 
			
		||||
	m_CountryCode = 0;
 | 
			
		||||
	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) {
 | 
			
		||||
@@ -273,6 +264,17 @@ void CharacterComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
 | 
			
		||||
	} else {
 | 
			
		||||
		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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user