summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-15 16:57:35 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-15 16:57:35 +0100
commit4bd7bafd7cef0c2f1238dcbbbf4282e6bc5a684f (patch)
treeecd6628c082ffdd0e12e1ac7616e69f9be0f55ac /src/control
parentincoming "fuck" commit (diff)
parentFix Jumbo Sound reseting when walking (diff)
downloadre3-4bd7bafd7cef0c2f1238dcbbbf4282e6bc5a684f.tar
re3-4bd7bafd7cef0c2f1238dcbbbf4282e6bc5a684f.tar.gz
re3-4bd7bafd7cef0c2f1238dcbbbf4282e6bc5a684f.tar.bz2
re3-4bd7bafd7cef0c2f1238dcbbbf4282e6bc5a684f.tar.lz
re3-4bd7bafd7cef0c2f1238dcbbbf4282e6bc5a684f.tar.xz
re3-4bd7bafd7cef0c2f1238dcbbbf4282e6bc5a684f.tar.zst
re3-4bd7bafd7cef0c2f1238dcbbbf4282e6bc5a684f.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Script7.cpp4
-rw-r--r--src/control/Script8.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/control/Script7.cpp b/src/control/Script7.cpp
index b3f16106..a5c8e717 100644
--- a/src/control/Script7.cpp
+++ b/src/control/Script7.cpp
@@ -95,8 +95,8 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
CollectParameters(&m_nIp, 2);
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
script_assert(pPed);
- ScriptParams[0] = pPed->GetWeapon(ScriptParams[1]).m_eWeaponType;
- ScriptParams[1] = pPed->GetWeapon(ScriptParams[1]).m_nAmmoTotal;
+ ScriptParams[0] = pPed->GetWeapon(ScriptParams[1] - 1).m_eWeaponType;
+ ScriptParams[1] = pPed->GetWeapon(ScriptParams[1] - 1).m_nAmmoTotal;
ScriptParams[2] = CPickups::ModelForWeapon((eWeaponType)ScriptParams[0]);
StoreParameters(&m_nIp, 3);
return 0;
diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp
index 2f52b150..afa213f2 100644
--- a/src/control/Script8.cpp
+++ b/src/control/Script8.cpp
@@ -66,7 +66,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
return 0;
case COMMAND_WANTED_STARS_ARE_FLASHING:
{
- CWanted *pWanted = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted;
+ CWanted* pWanted = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted;
UpdateCompareFlag(pWanted->m_nMinWantedLevel - pWanted->m_nWantedLevel > 0);
return 0;
}
@@ -136,7 +136,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
CTheScripts::ReadTextLabelFromScript(&m_nIp, key);
m_nIp += KEY_LENGTH_IN_SCRIPT;
CVector pos = pPlayerInfo->GetPos();
- CZone *infoZone = CTheZones::FindInformationZoneForPosition(&pos);
+ CZone* infoZone = CTheZones::FindInformationZoneForPosition(&pos);
UpdateCompareFlag(strncmp(key, infoZone->name, 8) == 0); // original code doesn't seem to be using strncmp in here and compare 2 ints instead
return 0;
}
@@ -352,7 +352,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
case COMMAND_CREATE_DUST_EFFECT_FOR_CUTSCENE_HELI:
{
CollectParameters(&m_nIp, 3);
- CObject *pHeli = CPools::GetObjectPool()->GetAt(ScriptParams[0]);
+ CObject* pHeli = CPools::GetObjectPool()->GetAt(ScriptParams[0]);
bool found = false;
float waterLevel = -1000.0f;
CVector pos = pHeli->GetPosition();