mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Depending on whch direction the helicopter came from, a different aniamtion will play when performing a heli insertion.
Requires GameDir >= r2212. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7755 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include "Facilities.h"
|
||||
#include "Debug Control.h"
|
||||
#include "expat.h"
|
||||
#include "merc entering.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include "Vehicles.h"
|
||||
@@ -1692,12 +1693,42 @@ UINT8 MoveAllInHelicopterToFootMovementGroup( INT8 bNewSquad )
|
||||
pSoldier->ubStrategicInsertionCode = ubInsertionCode;
|
||||
pSoldier->usStrategicInsertionData = usInsertionData;
|
||||
}
|
||||
|
||||
|
||||
// Flugente: we are leaving the helicopter and instantly deploy into combat - this must be an airdrop
|
||||
pSoldier->usSoldierFlagMask |= (SOLDIER_AIRDROP_TURN|SOLDIER_AIRDROP);
|
||||
}
|
||||
}
|
||||
|
||||
//Flugente: we need to determine what direction th heli came from, so that we can play the correct animation
|
||||
UINT8 usDirection = NORTH;
|
||||
|
||||
GROUP* pGroup = gpGroupList;
|
||||
while ( pGroup )
|
||||
{
|
||||
if ( pGroup->usGroupTeam == OUR_TEAM && IsGroupTheHelicopterGroup( pGroup ) ) // Group came from the examined source
|
||||
{
|
||||
if ( pGroup->ubSectorX == pGroup->ubPrevX - 1 && pGroup->ubSectorY == pGroup->ubPrevY )
|
||||
{
|
||||
usDirection = EAST;
|
||||
}
|
||||
else if ( pGroup->ubSectorX == pGroup->ubPrevX + 1 && pGroup->ubSectorY == pGroup->ubPrevY )
|
||||
{
|
||||
usDirection = WEST;
|
||||
}
|
||||
else if ( pGroup->ubSectorX == pGroup->ubPrevX && pGroup->ubSectorY == pGroup->ubPrevY - 1 )
|
||||
{
|
||||
usDirection = SOUTH;
|
||||
}
|
||||
|
||||
SetHelicopterDropDirection( usDirection );
|
||||
|
||||
break;
|
||||
}
|
||||
pGroup = pGroup->next;
|
||||
}
|
||||
|
||||
SetHelicopterDropDirection( usDirection );
|
||||
|
||||
if ( fAnyoneAboard )
|
||||
{
|
||||
ubGroupId = SquadMovementGroups[ bNewSquad ];
|
||||
|
||||
Reference in New Issue
Block a user