mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- bugfix: If merc is in crouched stance and he passes an item to another merc, he did not change his direction
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@895 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5116,20 +5116,29 @@ BOOLEAN HandleItemPointerClick( UINT16 usMapPos )
|
||||
// Stop merc first....
|
||||
EVENT_StopMerc( pSoldier, pSoldier->sGridNo, pSoldier->bDirection );
|
||||
|
||||
// If we are standing only...
|
||||
if ( gAnimControl[ pSoldier->usAnimState ].ubEndHeight == ANIM_STAND && !MercInWater( pSoldier ) )
|
||||
// WANNE: Also turn merc if he is crouched and he passes an item
|
||||
if ( !MercInWater( pSoldier ) )
|
||||
{
|
||||
// Turn to face, then do animation....
|
||||
EVENT_SetSoldierDesiredDirection( pSoldier, ubFacingDirection );
|
||||
pSoldier->fTurningUntilDone = TRUE;
|
||||
pSoldier->usPendingAnimation = PASS_OBJECT;
|
||||
}
|
||||
|
||||
if ( gAnimControl[ gpItemPointerSoldier->usAnimState ].ubEndHeight == ANIM_STAND && !MercInWater( gpItemPointerSoldier ) )
|
||||
if (gAnimControl[ pSoldier->usAnimState ].ubEndHeight == ANIM_STAND)
|
||||
{
|
||||
pSoldier->usPendingAnimation = PASS_OBJECT;
|
||||
}
|
||||
}
|
||||
|
||||
// WANNE: Also turn merc if he is crouched and he received the passed item
|
||||
if ( !MercInWater( gpItemPointerSoldier ) )
|
||||
{
|
||||
EVENT_SetSoldierDesiredDirection( gpItemPointerSoldier, gOppositeDirection[ ubFacingDirection ] );
|
||||
gpItemPointerSoldier->fTurningUntilDone = TRUE;
|
||||
gpItemPointerSoldier->usPendingAnimation = PASS_OBJECT;
|
||||
|
||||
if (gAnimControl[ gpItemPointerSoldier->usAnimState ].ubEndHeight == ANIM_STAND)
|
||||
{
|
||||
gpItemPointerSoldier->usPendingAnimation = PASS_OBJECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user