- bugfix: Turning APs were not deducted (wrong bugfix in version 653)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@664 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2007-01-18 18:11:41 +00:00
parent e4d8bfa058
commit 4477006e57
2 changed files with 14 additions and 28 deletions
BIN
View File
Binary file not shown.
-14
View File
@@ -124,9 +124,6 @@ enum
EX_DIRECTION_IRRELEVANT EX_DIRECTION_IRRELEVANT
} ExtendedWorldDirections; } ExtendedWorldDirections;
// WANNE
BOOLEAN bPreDeductPunchAPs = FALSE;
// LUT for conversion from 8-direction to extended direction // LUT for conversion from 8-direction to extended direction
UINT8 ubExtDirection[] = UINT8 ubExtDirection[] =
{ {
@@ -4838,9 +4835,6 @@ void EVENT_InternalSetSoldierDesiredDirection( SOLDIERTYPE *pSoldier, UINT16 usN
} }
if ( pSoldier->bDesiredDirection != pSoldier->bDirection ) if ( pSoldier->bDesiredDirection != pSoldier->bDirection )
{
// WANNE: If we punch the enemy, do not pre deduct the aps!
if (bPreDeductPunchAPs == TRUE)
{ {
if ( gAnimControl[ usAnimState ].uiFlags & ( ANIM_BREATH | ANIM_OK_CHARGE_AP_FOR_TURN | ANIM_FIREREADY ) && !fInitalMove && !pSoldier->fDontChargeTurningAPs ) if ( gAnimControl[ usAnimState ].uiFlags & ( ANIM_BREATH | ANIM_OK_CHARGE_AP_FOR_TURN | ANIM_FIREREADY ) && !fInitalMove && !pSoldier->fDontChargeTurningAPs )
{ {
@@ -4860,7 +4854,6 @@ void EVENT_InternalSetSoldierDesiredDirection( SOLDIERTYPE *pSoldier, UINT16 usN
DeductPoints( pSoldier, AP_LOOK_PRONE, 0 ); DeductPoints( pSoldier, AP_LOOK_PRONE, 0 );
break; break;
} }
}
} }
@@ -8816,20 +8809,13 @@ void EVENT_SoldierBeginPunchAttack( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8
return; return;
} }
if ( fChangeDirection ) if ( fChangeDirection )
{ {
// WANNE: Do not pre deduct APs for punching. These APs are calculated later!
bPreDeductPunchAPs = FALSE;
// CHANGE DIRECTION AND GOTO ANIMATION NOW // CHANGE DIRECTION AND GOTO ANIMATION NOW
EVENT_SetSoldierDesiredDirection( pSoldier, ubDirection ); EVENT_SetSoldierDesiredDirection( pSoldier, ubDirection );
EVENT_SetSoldierDirection( pSoldier, ubDirection ); EVENT_SetSoldierDirection( pSoldier, ubDirection );
bPreDeductPunchAPs = TRUE;
} }
// Are we a martial artist? // Are we a martial artist?
if ( HAS_SKILL_TRAIT( pSoldier, MARTIALARTS ) ) if ( HAS_SKILL_TRAIT( pSoldier, MARTIALARTS ) )
{ {