From 0b6dfdb24d2a31ad5703413aa67e94a23343db2a Mon Sep 17 00:00:00 2001 From: Shadooow Date: Fri, 21 May 2021 11:55:00 +0000 Subject: [PATCH] spread fire fixes in realtime mode - fixes spread fire not working properly and shooting elsewhere than assigned - fixes throwing items not working and instead firing from weapon - added the fix shooting to random direction that was previously added into Turn Based Input git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9034 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Real Time Input.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Tactical/Real Time Input.cpp b/Tactical/Real Time Input.cpp index 4fb392b3e..1fd7bcfe3 100644 --- a/Tactical/Real Time Input.cpp +++ b/Tactical/Real Time Input.cpp @@ -479,15 +479,13 @@ void QueryRTLeftButton( UINT32 *puiNewEvent ) } // CHECK IF WE CLICKED-HELD - if ( COUNTERDONE( LMOUSECLICK_DELAY_COUNTER ) && gpItemPointer != NULL ) + if ( COUNTERDONE( LMOUSECLICK_DELAY_COUNTER ) ) { // LEFT CLICK-HOLD EVENT // Switch on UI mode switch( gCurrentUIMode ) { case CONFIRM_ACTION_MODE: - case ACTION_MODE: - if( GetSoldier( &pSoldier, gusSelectedSoldier ) ) { if ( pSoldier->bDoBurst ) @@ -634,6 +632,11 @@ void QueryRTLeftButton( UINT32 *puiNewEvent ) // { // *puiNewEvent = CA_MERC_SHOOT; // } + if (GetSoldier(&pSoldier, gusSelectedSoldier)) + { + //shadooow: this fixes merc randomly shooting in different direction than assigned + pSoldier->flags.fDoSpread = 0; + } *puiNewEvent = CA_MERC_SHOOT; // } //}