fix: disable weapon wheel during rampage (issue #31)
linux / build (push) Successful in 11m28s

This commit is contained in:
2026-12-02 15:53:44 +00:00
parent a5c7a78305
commit 2e54d49035
+7
View File
@@ -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.