From 33316bcac8d75ab36b763de0112983495444be33 Mon Sep 17 00:00:00 2001 From: Flugente Date: Sat, 17 Jan 2015 22:21:34 +0000 Subject: [PATCH] A gun only counts as mounted if it is raised. This does not alter shooting mechanics and removes unnecessary code changes. As a sideeffect, mercs will complain less often about other mercs using them as weapon racks. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7719 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Soldier Control.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 090f6c54..1a1cbcdb 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -14387,6 +14387,10 @@ BOOLEAN SOLDIERTYPE::IsWeaponMounted( void ) else return(FALSE); } + // a gun can only be mounted if it's ready. The bonus is only relevant when this is true anyway (firing cth calculations require us to aim). + // Drawback is that we do not know whether we will the bonus until we raise our gun - but then again the entire 'get behind a rock and then look over it' system isn't exactly complicated to understand. + else if ( !WeaponReady( this ) ) + return FALSE; // we determine the height of the next tile in our direction. Because of the way structures are handled, we sometimes have to take the very tile we're occupying right now INT32 nextGridNoinSight = this->sGridNo;