mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
************************************************************
* Merged Source Code from Development Trunk: Revision 4063 * ************************************************************ - Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - This will be the Source for the Beta 2011 Test git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+37
-4
@@ -39,6 +39,7 @@
|
||||
#include "opplist.h"
|
||||
#include "Soldier ani.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Queen Command.h"
|
||||
#endif
|
||||
|
||||
//INT8 gubVehicleMovementGroups[ MAX_VEHICLES ];
|
||||
@@ -618,14 +619,44 @@ BOOLEAN AddSoldierToVehicle( SOLDIERTYPE *pSoldier, INT32 iId )
|
||||
}
|
||||
|
||||
|
||||
void SetSoldierExitVehicleInsertionData( SOLDIERTYPE *pSoldier, INT32 iId )
|
||||
void SetSoldierExitVehicleInsertionData( SOLDIERTYPE *pSoldier, INT32 iId, UINT8 iOldGroupID )
|
||||
{
|
||||
GROUP *pGroup;
|
||||
|
||||
if ( iId == iHelicopterVehicleId && !pSoldier->bInSector )
|
||||
{
|
||||
if( pSoldier->sSectorX != BOBBYR_SHIPPING_DEST_SECTOR_X || pSoldier->sSectorY != BOBBYR_SHIPPING_DEST_SECTOR_Y || pSoldier->bSectorZ != BOBBYR_SHIPPING_DEST_SECTOR_Z )
|
||||
{
|
||||
// Not anything different here - just use center gridno......
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_CENTER;
|
||||
if( NumHostilesInSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ ) > 0 && iOldGroupID != 0 && gGameExternalOptions.ubSkyriderHotLZ == 2 )
|
||||
{
|
||||
pGroup = GetGroup( iOldGroupID );
|
||||
if( pGroup->ubSectorX < pGroup->ubPrevX )
|
||||
{
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_EAST;
|
||||
}
|
||||
else if( pGroup->ubSectorX > pGroup->ubPrevX )
|
||||
{
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_WEST;
|
||||
}
|
||||
else if( pGroup->ubSectorY < pGroup->ubPrevY )
|
||||
{
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_SOUTH;
|
||||
}
|
||||
else if( pGroup->ubSectorY > pGroup->ubPrevY )
|
||||
{
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_NORTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not anything different here - just use center gridno......
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_CENTER;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -643,6 +674,7 @@ BOOLEAN RemoveSoldierFromVehicle( SOLDIERTYPE *pSoldier, INT32 iId )
|
||||
BOOLEAN fSoldierLeft = FALSE;
|
||||
BOOLEAN fSoldierFound = FALSE;
|
||||
SOLDIERTYPE *pVehicleSoldier;
|
||||
UINT8 iOldGroupID=0;
|
||||
|
||||
|
||||
if( ( iId >= ubNumberOfVehicles ) || ( iId < 0 ) )
|
||||
@@ -663,6 +695,7 @@ BOOLEAN RemoveSoldierFromVehicle( SOLDIERTYPE *pSoldier, INT32 iId )
|
||||
{
|
||||
fSoldierFound = TRUE;
|
||||
|
||||
iOldGroupID = pVehicleList[ iId ].pPassengers[ iCounter ]->ubGroupID;
|
||||
pVehicleList[ iId ].pPassengers[ iCounter ]->ubGroupID = 0;
|
||||
pVehicleList[ iId ].pPassengers[ iCounter ]->sSectorY = pVehicleList[ iId ].sSectorY;
|
||||
pVehicleList[ iId ].pPassengers[ iCounter ]->sSectorX = pVehicleList[ iId ].sSectorX;
|
||||
@@ -772,7 +805,7 @@ BOOLEAN RemoveSoldierFromVehicle( SOLDIERTYPE *pSoldier, INT32 iId )
|
||||
SetSectorFlag( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, SF_ALREADY_VISITED );
|
||||
}
|
||||
|
||||
SetSoldierExitVehicleInsertionData( pSoldier, iId );
|
||||
SetSoldierExitVehicleInsertionData( pSoldier, iId, iOldGroupID );
|
||||
|
||||
// Update in sector if this is the current sector.....
|
||||
if ( pSoldier->sSectorX == gWorldSectorX && pSoldier->sSectorY == gWorldSectorY && pSoldier->bSectorZ == gbWorldSectorZ )
|
||||
|
||||
Reference in New Issue
Block a user