- New Feature: Possibility to pick up items in crouch position (by Sandro)

o Merc can stay crouched while picking up items and when stealing items from prone(/collapsed) enemy, he must crouch (will do automatically). It really feels much more intuitive.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5265 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-05-06 15:43:59 +00:00
parent 4ad4f6c223
commit 062d1dd631
7 changed files with 95 additions and 12 deletions
+25 -1
View File
@@ -1572,8 +1572,32 @@ BOOLEAN ExecuteOverhead( )
{
//pSoldier->pathing.bDesiredDirection = pSoldier->aiData.bPendingActionData3;
pSoldier->EVENT_SetSoldierDesiredDirection( pSoldier->aiData.bPendingActionData3 );
// if we are crouching or prone, use steal in crouch
if ( gAnimControl[ pSoldier->usAnimState ].ubEndHeight == ANIM_PRONE || gAnimControl[ pSoldier->usAnimState ].ubEndHeight == ANIM_CROUCH )
{
pSoldier->EVENT_InitNewSoldierAnim( STEAL_ITEM_CROUCHED, 0 , FALSE );
}
else // otherwise determine our target position
{
SOLDIERTYPE *pTarget;
UINT16 usSoldierIndex;
usSoldierIndex = WhoIsThere2( pSoldier->aiData.sPendingActionData2, pSoldier->pathing.bLevel );
if ( usSoldierIndex != NOBODY )
{
pTarget = MercPtrs[ usSoldierIndex ];
pSoldier->EVENT_InitNewSoldierAnim( STEAL_ITEM, 0 , FALSE );
// we always need to crouch to prone target
if ( gAnimControl[ pTarget->usAnimState ].ubEndHeight == ANIM_PRONE )
pSoldier->EVENT_InitNewSoldierAnim( STEAL_ITEM_CROUCHED, 0 , FALSE );
else
pSoldier->EVENT_InitNewSoldierAnim( STEAL_ITEM, 0 , FALSE );
}
else // strange things can happe??
{
pSoldier->EVENT_InitNewSoldierAnim( STEAL_ITEM, 0 , FALSE );
}
}
pSoldier->aiData.ubPendingAction = NO_PENDING_ACTION;
}
else if ( pSoldier->aiData.ubPendingAction == MERC_KNIFEATTACK)