From 8b65e37cfd36ee17243360bf8586e56e0727e70f Mon Sep 17 00:00:00 2001 From: silversurfer Date: Tue, 10 Sep 2013 13:35:03 +0000 Subject: [PATCH] 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 --- Tactical/Handle UI.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index 807f45d8..998dbd94 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -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 ) {