summaryrefslogtreecommitdiffstats
path: root/src/control/Script4.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2021-01-25 23:01:32 +0100
committerGitHub <noreply@github.com>2021-01-25 23:01:32 +0100
commit0ae6d1fecf9a3609179089ea0ca4f01380f370d3 (patch)
tree24e3ff01a010dd57c1c4ba647a9059f329e04650 /src/control/Script4.cpp
parentconfig (diff)
parentMerge pull request #992 from ForeverL95/ForeverL95-patch-1 (diff)
downloadre3-0ae6d1fecf9a3609179089ea0ca4f01380f370d3.tar
re3-0ae6d1fecf9a3609179089ea0ca4f01380f370d3.tar.gz
re3-0ae6d1fecf9a3609179089ea0ca4f01380f370d3.tar.bz2
re3-0ae6d1fecf9a3609179089ea0ca4f01380f370d3.tar.lz
re3-0ae6d1fecf9a3609179089ea0ca4f01380f370d3.tar.xz
re3-0ae6d1fecf9a3609179089ea0ca4f01380f370d3.tar.zst
re3-0ae6d1fecf9a3609179089ea0ca4f01380f370d3.zip
Diffstat (limited to 'src/control/Script4.cpp')
-rw-r--r--src/control/Script4.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp
index 20e041da..d1dba350 100644
--- a/src/control/Script4.cpp
+++ b/src/control/Script4.cpp
@@ -39,6 +39,7 @@
#include "World.h"
#include "Zones.h"
#include "Bike.h"
+#include "Wanted.h"
// LCS: file done except TODOs
@@ -477,7 +478,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
float fx = pObject->GetForward().x;
float fy = pObject->GetForward().y;
float heading = LimitAngleOnCircle(
- RADTODEG(CGeneral::GetATanOfXY(pObject->GetForward().x, pObject->GetForward().y)));
+ RADTODEG(Atan2(-pObject->GetForward().x, pObject->GetForward().y)));
float headingTarget = GET_FLOAT_PARAM(1);
#ifdef FIX_BUGS
float rotateBy = GET_FLOAT_PARAM(2) * CTimer::GetTimeStepFix();
@@ -935,6 +936,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
script_assert(pVehicle);
pPed->SetObjective(OBJECTIVE_ENTER_CAR_AS_DRIVER, pVehicle);
pPed->WarpPedIntoCar(pVehicle);
+ pPed->RestorePreviousObjective();
return 0;
}
case COMMAND_WARP_CHAR_INTO_CAR: