From daf1de550c307b984c0092d3dda4eba5234cbd10 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Wed, 13 Jan 2021 22:02:28 +0300 Subject: fix --- src/control/Script7.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/control') 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; -- cgit v1.2.3 From 6a93cc49be79a397bb1549813ba2001fbbab120f Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 14 Jan 2021 00:15:45 +0300 Subject: fix --- src/control/Script8.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/control') diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp index 74552b23..c34830e7 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(); @@ -396,11 +396,13 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) return 0; #elif (!defined GTA_PS2) case COMMAND_SET_ONSCREEN_COUNTER_FLASH_WHEN_FIRST_DISPLAYED: + { script_assert(CTheScripts::ScriptSpace[m_nIp++] == ARGUMENT_GLOBALVAR); uint16 var = CTheScripts::Read2BytesFromScript(&m_nIp); CollectParameters(&m_nIp, 1); //CUserDisplay::OnscnTimer.SetCounterFlashWhenFirstDisplayed(var, ScriptParams[0]); - break; + return 0; + } #endif #if (defined GTA_PC && !defined GTAVC_JP_PATCH || defined GTA_XBOX || defined SUPPORT_XBOX_SCRIPT || defined GTA_MOBILE || defined SUPPORT_MOBILE_SCRIPT) case COMMAND_SHUFFLE_CARD_DECKS: -- cgit v1.2.3 From 0b0d286f5c0ce3bdc4cebccb43adb45c76cb3dab Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 14 Jan 2021 23:15:12 +0300 Subject: incoming "fuck" commit --- src/control/Script2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/control') diff --git a/src/control/Script2.cpp b/src/control/Script2.cpp index a94bf907..f2d9ed9e 100644 --- a/src/control/Script2.cpp +++ b/src/control/Script2.cpp @@ -1299,9 +1299,9 @@ int8 CRunningScript::ProcessCommands400To499(int32 command) CollectParameters(&m_nIp, 2); CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); script_assert(pPed); - CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[1]); + CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[1]); pPed->bScriptObjectiveCompleted = false; - pPed->SetObjective(OBJECTIVE_DESTROY_OBJECT, pVehicle); + pPed->SetObjective(OBJECTIVE_DESTROY_OBJECT, pObject); return 0; } case COMMAND_SET_CHAR_OBJ_DESTROY_CAR: -- cgit v1.2.3