summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-20 19:40:36 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-20 19:40:36 +0200
commitf33a01e8c8db821b5c6457715f98aa8762d00167 (patch)
tree9a41c75660aac8e6dd6be8fa24e4b61fb05e0e23 /src/control/Script.cpp
parentscript revision (diff)
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.gz
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.bz2
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.lz
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.xz
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.tar.zst
re3-f33a01e8c8db821b5c6457715f98aa8762d00167.zip
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index dd119c5a..33642869 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -7000,7 +7000,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;
@@ -7049,7 +7053,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;
@@ -7221,12 +7229,13 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
}
case COMMAND_CREATE_FLOATING_PACKAGE:
{
- CollectParameters(&m_nIp, 3);
- CVector pos = *(CVector*)&ScriptParams[0];
- if (pos.z <= MAP_Z_LOW_LIMIT)
- pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET;
- ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_FLOATPACKAGE1, PICKUP_FLOATINGPACKAGE, 0);
- StoreParameters(&m_nIp, 1);
+// removed in MIAMI
+// CollectParameters(&m_nIp, 3);
+// CVector pos = *(CVector*)&ScriptParams[0];
+// if (pos.z <= MAP_Z_LOW_LIMIT)
+// pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET;
+// ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_FLOATPACKAGE1, PICKUP_FLOATINGPACKAGE, 0);
+// StoreParameters(&m_nIp, 1);
return 0;
}
case COMMAND_PLACE_OBJECT_RELATIVE_TO_CAR:
@@ -8681,8 +8690,8 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
return 0;
}
case COMMAND_GET_BODY_CAST_HEALTH:
- ScriptParams[0] = CObject::nBodyCastHealth;
- StoreParameters(&m_nIp, 1);
+ // ScriptParams[0] = CObject::nBodyCastHealth;
+ // StoreParameters(&m_nIp, 1);
return 0;
case COMMAND_SET_CHARS_CHATTING:
{