mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- 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:
+25
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user