mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Brief: //dnl ch64
- Fixing Tank bursting shells problem, and some other tank related bugs. Details: - There are several problem with Tank handling, main was forcing to use gun although already decide to use machinegun which lead to bursting shells. - Another one was related to machinegun usage as current autofire handling is not supported by TANK BURST animation which had limit to 6 rounds, so decision to fire anything different then 6 lead to complete wrong APs deduction. - Fix some invalid animation decision as current tank cannot raise gun or move or check for cover. - Fix problem with wrong return (INT8) although after introduction of 100AP system APs variables are INT16 which create bad APs calculation for tank. - Fix general problem with burst and autofire when soldier decide to when swap weapons. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6340 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1233,7 +1233,8 @@ void CancelAIAction(SOLDIERTYPE *pSoldier, UINT8 ubForce)
|
||||
#endif
|
||||
|
||||
// re-enable cover checking, something is new or something strange happened
|
||||
SkipCoverCheck = FALSE;
|
||||
if(!TANK(pSoldier))//dnl ch64 290813
|
||||
SkipCoverCheck = FALSE;
|
||||
|
||||
// turn off new situation flag to stop this from repeating all the time!
|
||||
if ( pSoldier->aiData.bNewSituation == IS_NEW_SITUATION )
|
||||
@@ -1502,6 +1503,8 @@ void RefreshAI(SOLDIERTYPE *pSoldier)
|
||||
|
||||
if (pSoldier->aiData.bAlertStatus == STATUS_YELLOW)
|
||||
SkipCoverCheck = FALSE;
|
||||
if(TANK(pSoldier))//dnl ch64 290813 tanks don't have move animations
|
||||
SkipCoverCheck = TRUE;
|
||||
|
||||
// if he's in battle or knows opponents are here
|
||||
if (gfTurnBasedAI)
|
||||
@@ -1591,7 +1594,8 @@ INT8 ExecuteAction(SOLDIERTYPE *pSoldier)
|
||||
|
||||
// in most cases, merc will change location, or may cause damage to opponents,
|
||||
// so a new cover check will be necessary. Exceptions handled individually.
|
||||
SkipCoverCheck = FALSE;
|
||||
if(!TANK(pSoldier))//dnl ch64 290813
|
||||
SkipCoverCheck = FALSE;
|
||||
|
||||
// reset this field, too
|
||||
pSoldier->aiData.bLastAttackHit = FALSE;
|
||||
@@ -1600,7 +1604,7 @@ INT8 ExecuteAction(SOLDIERTYPE *pSoldier)
|
||||
UINT16 usHandItem = pSoldier->inv[HANDPOS].usItem;
|
||||
|
||||
INT8 bSlot;
|
||||
|
||||
#if 0//dnl ch64 260813 decision to use machinegun or cannon is done in DecideAction, this here will just lead into burst with cannon if decision was use machinegun
|
||||
if (TANK(pSoldier))
|
||||
{
|
||||
// No cannon selected to fire
|
||||
@@ -1618,7 +1622,7 @@ INT8 ExecuteAction(SOLDIERTYPE *pSoldier)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
UINT16 usSoldierIndex; // added by SANDRO
|
||||
|
||||
#ifdef TESTAICONTROL
|
||||
|
||||
Reference in New Issue
Block a user