From 2e54d49035fc90cc5df4f146d924955998d109e1 Mon Sep 17 00:00:00 2001 From: opencode Date: Wed, 2 Dec 2026 15:53:44 +0000 Subject: [PATCH] fix: disable weapon wheel during rampage (issue #31) --- src/extras/weaponwheel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/extras/weaponwheel.cpp b/src/extras/weaponwheel.cpp index 1a3d5bc0..feb19b65 100644 --- a/src/extras/weaponwheel.cpp +++ b/src/extras/weaponwheel.cpp @@ -39,6 +39,7 @@ #include "Camera.h" #include "CutsceneMgr.h" +#include "Darkel.h" #include "DMAudio.h" #include "Font.h" #include "Frontend.h" @@ -555,6 +556,12 @@ Wheel_AllowedToOpen(void) return false; if (CReplay::IsPlayingBack() || TheCamera.m_WideScreenOn || CGame::playingIntro) return false; + // A GTA III rampage locks the player's weapon, so the wheel must not open + // and must not apply a switch while one runs. The weapon wheel only opens + // on foot (Wheel_WeaponTriggerHeld is false in a vehicle), so require that + // here too; this leaves the in-car radio wheel unaffected. + if (FindPlayerVehicle() == nil && CDarkel::FrenzyOnGoing()) + return false; // Rendering (and therefore CHud::Draw) is skipped during the fully faded // state and during scene edit; close the wheel rather than leaving it open // while it cannot be seen.