From 0217f88c445b43365a55438e86f590eb296254f6 Mon Sep 17 00:00:00 2001 From: jadebenn Date: Wed, 22 Nov 2023 08:06:09 -0600 Subject: [PATCH] pet emote fix (#1315) --- dGame/dGameMessages/GameMessages.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dGame/dGameMessages/GameMessages.cpp b/dGame/dGameMessages/GameMessages.cpp index 4cddebff..34b031d3 100644 --- a/dGame/dGameMessages/GameMessages.cpp +++ b/dGame/dGameMessages/GameMessages.cpp @@ -5017,6 +5017,14 @@ void GameMessages::HandlePlayEmote(RakNet::BitStream* inStream, Entity* entity) if (emoteID == 0) return; std::string sAnimationName = "deaded"; //Default name in case we fail to get the emote + CDEmoteTableTable* emotes = CDClientManager::Instance().GetTable(); + if (emotes) { + CDEmoteTable* emote = emotes->GetEmote(emoteID); + if (emote) sAnimationName = emote->animationName; + } + + RenderComponent::PlayAnimation(entity, sAnimationName); + MissionComponent* missionComponent = entity->GetComponent(); if (!missionComponent) return; @@ -5042,14 +5050,6 @@ void GameMessages::HandlePlayEmote(RakNet::BitStream* inStream, Entity* entity) missionComponent->Progress(eMissionTaskType::EMOTE, emoteID, scripted->GetObjectID()); } } - - CDEmoteTableTable* emotes = CDClientManager::Instance().GetTable(); - if (emotes) { - CDEmoteTable* emote = emotes->GetEmote(emoteID); - if (emote) sAnimationName = emote->animationName; - } - - RenderComponent::PlayAnimation(entity, sAnimationName); } void GameMessages::HandleModularBuildConvertModel(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {