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
This commit is contained in:
Shadooow
2021-05-21 11:55:00 +00:00
parent 43dfa982a5
commit 0b6dfdb24d
+6 -3
View File
@@ -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;
// }
//}