Skip to content

Commit

Permalink
Fixed the casting on the position x/y/z parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
varenx committed Sep 26, 2023
1 parent 65bfb56 commit fe34ec3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Plugins/Events/Events/MovementEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ int32_t ActionJumpToPointHook(CNWSCreature* thisPtr, CNWSObjectActionNode* pActi

auto PushAndSignal = [&](const std::string& ev) -> bool {
PushEventData("TARGET_AREA", Utils::ObjectIDToString((uint32_t)pActionNode->m_pParameter[3]));
PushEventData("POS_X", std::to_string((float)pActionNode->m_pParameter[0]));
PushEventData("POS_Y", std::to_string((float)pActionNode->m_pParameter[1]));
PushEventData("POS_Z", std::to_string((float)pActionNode->m_pParameter[2]));
PushEventData("POS_X", std::to_string(*(float*)&pActionNode->m_pParameter[0]));
PushEventData("POS_Y", std::to_string(*(float*)&pActionNode->m_pParameter[1]));
PushEventData("POS_Z", std::to_string(*(float*)&pActionNode->m_pParameter[2]));
return SignalEvent(ev, thisPtr->m_idSelf, &result);
};

Expand Down

0 comments on commit fe34ec3

Please sign in to comment.