Skip to content

Commit

Permalink
Merge pull request #1703 from varenx/jumptopoint-position-fix
Browse files Browse the repository at this point in the history
Fixed the casting on the position x/y/z parameters
  • Loading branch information
Daztek authored Sep 26, 2023
2 parents 65bfb56 + fe34ec3 commit 89c1305
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 89c1305

Please sign in to comment.