summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-20 13:39:36 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-20 13:39:36 +0200
commitc53b23cff026e72bca295495ab0bc9c20a18c599 (patch)
tree172de606bc1a2e203f8ee5933a47e26370f90668 /src/control
parentMerge pull request #569 from aap/miami (diff)
parentfixed script bug (diff)
downloadre3-c53b23cff026e72bca295495ab0bc9c20a18c599.tar
re3-c53b23cff026e72bca295495ab0bc9c20a18c599.tar.gz
re3-c53b23cff026e72bca295495ab0bc9c20a18c599.tar.bz2
re3-c53b23cff026e72bca295495ab0bc9c20a18c599.tar.lz
re3-c53b23cff026e72bca295495ab0bc9c20a18c599.tar.xz
re3-c53b23cff026e72bca295495ab0bc9c20a18c599.tar.zst
re3-c53b23cff026e72bca295495ab0bc9c20a18c599.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Script.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 6f4e60d5..1ea68dd3 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -3097,9 +3097,9 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
pCarGen->SwitchOff();
}else if (ScriptParams[1] <= 100){
pCarGen->SwitchOn();
+ pCarGen->SetUsesRemaining(ScriptParams[1]);
}else{
pCarGen->SwitchOn();
- pCarGen->SetUsesRemaining(ScriptParams[1]);
}
return 0;
}
@@ -6899,7 +6899,11 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
float heading = LimitAngleOnCircle(
RADTODEG(Atan2(-pObject->GetForward().x, pObject->GetForward().y)));
float headingTarget = *(float*)&ScriptParams[1];
+#ifdef FIX_BUGS
+ float rotateBy = *(float*)&ScriptParams[2] * CTimer::GetTimeStepFix();
+#else
float rotateBy = *(float*)&ScriptParams[2];
+#endif
if (headingTarget == heading) { // using direct comparasion here is fine
UpdateCompareFlag(true);
return 0;
@@ -6948,7 +6952,11 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
assert(pObject);
CVector pos = pObject->GetPosition();
CVector posTarget = *(CVector*)&ScriptParams[1];
+#ifdef FIX_BUGS
+ CVector slideBy = *(CVector*)&ScriptParams[4] * CTimer::GetTimeStepFix();
+#else
CVector slideBy = *(CVector*)&ScriptParams[4];
+#endif
if (posTarget == pos) { // using direct comparasion here is fine
UpdateCompareFlag(true);
return 0;