- 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:
Wanne
2007-05-23 18:41:42 +00:00
parent 4effa1c3ea
commit bd22863e45
2 changed files with 15 additions and 6 deletions
BIN
View File
Binary file not shown.
+15 -6
View File
@@ -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;
}
}
}