summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-13 20:02:28 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-13 20:02:28 +0100
commitdaf1de550c307b984c0092d3dda4eba5234cbd10 (patch)
treeb08bba5a0667eac0abfa8ee51ecacadc69cc57fc
parentFix backface culling of cutscene objects (diff)
downloadre3-daf1de550c307b984c0092d3dda4eba5234cbd10.tar
re3-daf1de550c307b984c0092d3dda4eba5234cbd10.tar.gz
re3-daf1de550c307b984c0092d3dda4eba5234cbd10.tar.bz2
re3-daf1de550c307b984c0092d3dda4eba5234cbd10.tar.lz
re3-daf1de550c307b984c0092d3dda4eba5234cbd10.tar.xz
re3-daf1de550c307b984c0092d3dda4eba5234cbd10.tar.zst
re3-daf1de550c307b984c0092d3dda4eba5234cbd10.zip
-rw-r--r--src/control/Script7.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/Script7.cpp b/src/control/Script7.cpp
index 5a70fd28..55068bb6 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;