diff --git a/GameSettings.cpp b/GameSettings.cpp index 913e374d3..31eee59a2 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -1262,8 +1262,11 @@ void LoadGameExternalOptions() gGameExternalOptions.fShotHeadDivisor = iniReader.ReadFloat("Tactical Interface Settings","SHOT_HEAD_DIVISOR",1.5,1,10); // Penalty for fire when you don't see enemy (when you see enemy because his see militya or ather merc) - gGameExternalOptions.iPenaltyShootUnSeen = iniReader.ReadInteger("Tactical Interface Settings","SHOOT_UNSEEN_PENALTY",0,0,255); - + gGameExternalOptions.iPenaltyShootUnSeen = iniReader.ReadInteger("Tactical Interface Settings","SHOOT_UNSEEN_PENALTY",0,0,255); + + // Flugente: in turnbased combat, do not adjust animation after arriving at target location + gGameExternalOptions.fNoStandingAnimAdjustInCombat = iniReader.ReadBoolean("Tactical Interface Settings","NO_STANDING_ANIM_ADJUSTMENT_IN_COMBAT", TRUE); + //Inventory AP Weight Divisor gGameExternalOptions.uWeightDivisor = iniReader.ReadFloat("Tactical Interface Settings","INV_AP_WEIGHT_DIVISOR",5,0,100); diff --git a/GameSettings.h b/GameSettings.h index 64e892cbb..b78569fe8 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -733,6 +733,7 @@ typedef struct FLOAT uShotHeadPenalty; FLOAT fShotHeadDivisor; INT16 iPenaltyShootUnSeen; + BOOLEAN fNoStandingAnimAdjustInCombat; // Flugente: in turnbased combat, do not adjust animation after arriving at target location //Inventory AP Weight Divisor FLOAT uWeightDivisor; diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 9d353fd58..913998a18 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -1701,7 +1701,18 @@ BOOLEAN ExecuteOverhead( ) if ( !fAimAfterMove ) // SANDRO - don't do this after movement with weapon raised { - pSoldier->SoldierGotoStationaryStance( ); + // Flugente: if in turnbased combat and option is selected, do not go to standing animation + // By this, we wont have to spend additional APs when we continue to run + if ( gTacticalStatus.uiFlags & TURNBASED && gTacticalStatus.uiFlags & INCOMBAT && gGameExternalOptions.fNoStandingAnimAdjustInCombat ) + { + pSoldier->AdjustNoAPToFinishMove( TRUE ); + + pSoldier->usPendingAnimation = NO_PENDING_ANIMATION; + pSoldier->ubPendingDirection = NO_PENDING_DIRECTION; + pSoldier->aiData.ubPendingAction = NO_PENDING_ACTION; + } + else + pSoldier->SoldierGotoStationaryStance( ); } } }