Changed handling of aiming in realtime mode

Before it was not possible to aim in realtime mode because the UI didn't support it. It still doesn't support it but from now on the game will assume that we used the maximum number of aim clicks. Turn based combat is not affected by this.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6384 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-09-10 13:35:03 +00:00
parent 7c70b7a6d2
commit 8b65e37cfd
+7 -2
View File
@@ -2545,8 +2545,6 @@ void UIHandleMercAttack( SOLDIERTYPE *pSoldier , SOLDIERTYPE *pTargetSoldier, IN
}
}
// Set aim time to one in UI
pSoldier->aiData.bAimTime = (pSoldier->aiData.bShownAimTime );
// ATE: Check if we are targeting an interactive tile, and adjust gridno accordingly...
pIntNode = GetCurInteractiveTileGridNoAndStructure( &sGridNo, &pStructure );
@@ -2567,6 +2565,13 @@ void UIHandleMercAttack( SOLDIERTYPE *pSoldier , SOLDIERTYPE *pTargetSoldier, IN
}
}
// In realtime mode we cannot aim. Assume that max allowed aiming levels will be used.
if ( gTacticalStatus.uiFlags & REALTIME || !( gTacticalStatus.uiFlags & INCOMBAT ) )
pSoldier->aiData.bAimTime = AllowedAimingLevels(pSoldier, sGridNo);
else
// Set aim time to one in UI
pSoldier->aiData.bAimTime = (pSoldier->aiData.bShownAimTime );
// here, change gridno if we're targeting ourselves....
if ( pIntNode != NULL )
{