From 2defb8259b7cf8df0e43eca5fd1e9d78f979e2ef Mon Sep 17 00:00:00 2001 From: Flugente Date: Wed, 25 May 2016 19:39:10 +0000 Subject: [PATCH] Fix: after firing an underbarrel GL, it was possible to reload via leftclick for a short time, leading to reload of main gun with a grenade git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8235 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/UI Cursors.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Tactical/UI Cursors.cpp b/Tactical/UI Cursors.cpp index 0427676d..f0560f33 100644 --- a/Tactical/UI Cursors.cpp +++ b/Tactical/UI Cursors.cpp @@ -1942,6 +1942,15 @@ UINT8 HandleNonActivatedTossCursor( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEA if ( !EnoughAmmo( pSoldier, FALSE, HANDPOS ) ) { + // Flugente: if we are using an underbarrel GL, we aren't even supposed to be able to reload via leftclick here + // recalculate the correct firing mode and be done + if ( (pSoldier->bWeaponMode == WM_ATTACHED_GL || pSoldier->bWeaponMode == WM_ATTACHED_GL_BURST || pSoldier->bWeaponMode == WM_ATTACHED_GL_AUTO) && IsGrenadeLauncherAttached( &(pSoldier->inv[HANDPOS]) ) ) + { + ChangeWeaponMode( pSoldier ); + + return(BAD_RELOAD_UICURSOR); + } + // Check if ANY ammo exists..... if ( FindAmmoToReload( pSoldier, HANDPOS, NO_SLOT ) == NO_SLOT ) {