Skip to content

Commit

Permalink
pet emote fix (#1315)
Browse files Browse the repository at this point in the history
  • Loading branch information
jadebenn authored Nov 22, 2023
1 parent 198b337 commit 0217f88
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dGame/dGameMessages/GameMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CDEmoteTableTable>();
if (emotes) {
CDEmoteTable* emote = emotes->GetEmote(emoteID);
if (emote) sAnimationName = emote->animationName;
}

RenderComponent::PlayAnimation(entity, sAnimationName);

MissionComponent* missionComponent = entity->GetComponent<MissionComponent>();
if (!missionComponent) return;

Expand All @@ -5042,14 +5050,6 @@ void GameMessages::HandlePlayEmote(RakNet::BitStream* inStream, Entity* entity)
missionComponent->Progress(eMissionTaskType::EMOTE, emoteID, scripted->GetObjectID());
}
}

CDEmoteTableTable* emotes = CDClientManager::Instance().GetTable<CDEmoteTableTable>();
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) {
Expand Down

0 comments on commit 0217f88

Please sign in to comment.