From 40ab1020dc343b87f307d0e79095a5cd60b7fa90 Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Sat, 24 Jun 2006 17:57:35 +0000 Subject: [PATCH] -fixed sniper firing (finally?) -added Ready Weapon AP bonuses to two handed weapons (even though none use it yet) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@296 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 4 ++-- Tactical/LOS.cpp | 2 +- Tactical/Points.cpp | 4 ++-- TacticalAI/AIInternals.h | 4 ++-- TacticalAI/DecideAction.cpp | 22 +++++++++++----------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index ee42d2b2..d8eefbd0 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.295" }; + INT16 zVersionLabel[256] = { L"Release v1.13.296" }; #endif -INT8 czVersionNumber[16] = { "Build 06.06.23" }; +INT8 czVersionNumber[16] = { "Build 06.06.24" }; INT16 zTrackingNumber[16] = { L"Z" }; diff --git a/Tactical/LOS.cpp b/Tactical/LOS.cpp index ad136660..b9a0370e 100644 --- a/Tactical/LOS.cpp +++ b/Tactical/LOS.cpp @@ -3443,7 +3443,7 @@ DOUBLE CalculateVerticalAngle( SOLDIERTYPE * pFirer, SOLDIERTYPE * pTarget ) INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOAT dEndZ, UINT16 usHandItem, INT16 sHitBy, BOOLEAN fBuckshot, BOOLEAN fFake ) { - DebugMsg(TOPIC_JA2,DBG_LEVEL_3,"FireBulletGivenTarget"); + //DebugMsg(TOPIC_JA2,DBG_LEVEL_3,"FireBulletGivenTarget"); // fFake indicates that we should set things up for a call to ChanceToGetThrough FLOAT dStartZ; diff --git a/Tactical/Points.cpp b/Tactical/Points.cpp index 7768671a..43e693e3 100644 --- a/Tactical/Points.cpp +++ b/Tactical/Points.cpp @@ -2031,8 +2031,8 @@ INT16 GetAPsToReadyWeapon( SOLDIERTYPE *pSoldier, UINT16 usAnimState ) { //Madd: return the greater of the two weapons + 1: UINT8 rt1, rt2; - rt1 = Weapon[usItem].ubReadyTime; - rt2 = Weapon[pSoldier->inv[SECONDHANDPOS].usItem].ubReadyTime ; + rt1 = Weapon[usItem].ubReadyTime * ( 100 - GetPercentReadyTimeAPReduction(&pSoldier->inv[ HANDPOS ]) ) / 100; + rt2 = Weapon[pSoldier->inv[SECONDHANDPOS].usItem].ubReadyTime * ( 100 - GetPercentReadyTimeAPReduction(&pSoldier->inv[ SECONDHANDPOS ]) ) / 100; return( max(rt1,rt2) + AP_READY_DUAL ); } diff --git a/TacticalAI/AIInternals.h b/TacticalAI/AIInternals.h index 46351acb..7e0efa41 100644 --- a/TacticalAI/AIInternals.h +++ b/TacticalAI/AIInternals.h @@ -114,8 +114,8 @@ typedef struct } THREATTYPE; // define for bAimTime for bursting -#define BURSTING 5 -#define AUTOFIRING 6 +#define BURSTING 20 +#define AUTOFIRING 21 typedef struct { diff --git a/TacticalAI/DecideAction.cpp b/TacticalAI/DecideAction.cpp index b0da397b..026582d7 100644 --- a/TacticalAI/DecideAction.cpp +++ b/TacticalAI/DecideAction.cpp @@ -4847,18 +4847,18 @@ INT8 DecideAction(SOLDIERTYPE *pSoldier) if ( pSoldier->bTeam != MILITIA_TEAM ) { - if ( !sniperwarning && pSoldier->bOrders == SNIPER ) - { - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Watch out for snipers..." ); - sniperwarning = TRUE; - } + if ( !sniperwarning && pSoldier->bOrders == SNIPER ) + { + ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Watch out for snipers..." ); + sniperwarning = TRUE; + } - if (!biggunwarning && FindRocketLauncherOrCannon(pSoldier) != NO_SLOT ) - { - biggunwarning = TRUE; - //TODO: don't say this again after reloading a savegame - SayQuoteFromAnyBodyInSector( QUOTE_WEARY_SLASH_SUSPUCIOUS ); - } + if (!biggunwarning && FindRocketLauncherOrCannon(pSoldier) != NO_SLOT ) + { + biggunwarning = TRUE; + //TODO: don't say this again after reloading a savegame + SayQuoteFromAnyBodyInSector( QUOTE_WEARY_SLASH_SUSPUCIOUS ); + } } // turn off cautious flag pSoldier->fAIFlags &= (~AI_CAUTIOUS);