mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Implemented the missing option of hot drop merc via helicopter into center of the map only, ie. ALLOW_SKYRIDER_HOT_LZ = 1
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9243 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1581,7 +1581,7 @@ void AddSoldierToSectorGridNo( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubDir
|
|||||||
{
|
{
|
||||||
pSoldier->usSoldierFlagMask &= ~SOLDIER_AIRDROP;
|
pSoldier->usSoldierFlagMask &= ~SOLDIER_AIRDROP;
|
||||||
|
|
||||||
if ( gGameExternalOptions.ubSkyriderHotLZ == 3 )
|
if ((gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3))
|
||||||
{
|
{
|
||||||
gfIgnoreScrolling = FALSE;
|
gfIgnoreScrolling = FALSE;
|
||||||
INT16 sNewCenterWorldX, sNewCenterWorldY;
|
INT16 sNewCenterWorldX, sNewCenterWorldY;
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ void InitTacticalPlacementGUI()
|
|||||||
!( MercPtrs[ i ]->flags.uiStatusFlags & ( SOLDIER_VEHICLE ) ) ) // ATE Ignore vehicles
|
!( MercPtrs[ i ]->flags.uiStatusFlags & ( SOLDIER_VEHICLE ) ) ) // ATE Ignore vehicles
|
||||||
{
|
{
|
||||||
// Flugente: if options allow it and we entered this sector - in combat - via helicopter, then allow us free selection of our entry point, and drop us from the helicopter
|
// Flugente: if options allow it and we entered this sector - in combat - via helicopter, then allow us free selection of our entry point, and drop us from the helicopter
|
||||||
if ( MercPtrs[ i ]->bTeam == gbPlayerNum && gGameExternalOptions.ubSkyriderHotLZ == 3 && MercPtrs[ i ]->usSoldierFlagMask & SOLDIER_AIRDROP )
|
if ( MercPtrs[ i ]->bTeam == gbPlayerNum && (gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && MercPtrs[ i ]->usSoldierFlagMask & SOLDIER_AIRDROP )
|
||||||
{
|
{
|
||||||
AddMercToHeli( MercPtrs[ i ]->ubID );
|
AddMercToHeli( MercPtrs[ i ]->ubID );
|
||||||
|
|
||||||
@@ -764,7 +764,7 @@ void RenderTacticalPlacementGUI()
|
|||||||
|
|
||||||
if( gbCursorMercID == -1 )
|
if( gbCursorMercID == -1 )
|
||||||
{
|
{
|
||||||
if ( GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE )
|
if ( GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE || (gfCenter && gGameExternalOptions.ubSkyriderHotLZ == 1))
|
||||||
{
|
{
|
||||||
INT16 sCellX = 0;
|
INT16 sCellX = 0;
|
||||||
INT16 sCellY = 0;
|
INT16 sCellY = 0;
|
||||||
@@ -936,7 +936,7 @@ void RenderTacticalPlacementGUI()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE )
|
if ( GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE || (gfCenter && gGameExternalOptions.ubSkyriderHotLZ == 1 && gbSelectedMercID >= 0 && gMercPlacement[gbSelectedMercID].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP))
|
||||||
{
|
{
|
||||||
INT16 sCellX = 0;
|
INT16 sCellX = 0;
|
||||||
INT16 sCellY = 0;
|
INT16 sCellY = 0;
|
||||||
@@ -1025,7 +1025,7 @@ void RenderTacticalPlacementGUI()
|
|||||||
|
|
||||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||||
|
|
||||||
if (!gfCenter || (gGameExternalOptions.ubSkyriderHotLZ == 3 && gbSelectedMercID >= 0 && !(gMercPlacement[ gbSelectedMercID ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP)) )
|
if (!gfCenter || ((gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && gbSelectedMercID >= 0 && !(gMercPlacement[ gbSelectedMercID ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP)) )
|
||||||
Blt16BPPBufferLooseHatchRectWithColor( (UINT16*)pDestBuf, uiDestPitchBYTES, &gTPClipRect, usHatchColor );
|
Blt16BPPBufferLooseHatchRectWithColor( (UINT16*)pDestBuf, uiDestPitchBYTES, &gTPClipRect, usHatchColor );
|
||||||
// WANNE - MP: Center
|
// WANNE - MP: Center
|
||||||
else
|
else
|
||||||
@@ -1038,7 +1038,7 @@ void RenderTacticalPlacementGUI()
|
|||||||
|
|
||||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
|
|
||||||
if (!gfCenter || (gGameExternalOptions.ubSkyriderHotLZ == 3 && gbSelectedMercID >= 0 && !(gMercPlacement[ gbSelectedMercID ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP)) )
|
if (!gfCenter || ((gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && gbSelectedMercID >= 0 && !(gMercPlacement[ gbSelectedMercID ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP)) )
|
||||||
RectangleDraw( TRUE, gTPClipRect.iLeft, gTPClipRect.iTop, gTPClipRect.iRight, gTPClipRect.iBottom, usHatchColor, pDestBuf );
|
RectangleDraw( TRUE, gTPClipRect.iLeft, gTPClipRect.iTop, gTPClipRect.iRight, gTPClipRect.iBottom, usHatchColor, pDestBuf );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1253,7 +1253,7 @@ void TacticalPlacementHandle()
|
|||||||
// WANNE - MP: Center
|
// WANNE - MP: Center
|
||||||
if ( gfCenter && (is_networked ||
|
if ( gfCenter && (is_networked ||
|
||||||
GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE ||
|
GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE ||
|
||||||
( gGameExternalOptions.ubSkyriderHotLZ == 3 && gMercPlacement[gbSelectedMercID].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )) )
|
((gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && gMercPlacement[gbSelectedMercID].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )) )
|
||||||
{
|
{
|
||||||
if ( GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE )
|
if ( GetEnemyEncounterCode() == ENEMY_AMBUSH_DEPLOYMENT_CODE )
|
||||||
{
|
{
|
||||||
@@ -1409,6 +1409,7 @@ void ChooseRandomEdgepoints()
|
|||||||
// have the merc look outward. We add + 100 because later on we use this to signify that we want really enforce this direction
|
// have the merc look outward. We add + 100 because later on we use this to signify that we want really enforce this direction
|
||||||
gMercPlacement[i].pSoldier->ubInsertionDirection = (UINT8)GetDirectionToGridNoFromGridNo( gMapInformation.sCenterGridNo, gMercPlacement[i].pSoldier->usStrategicInsertionData ) + 100;
|
gMercPlacement[i].pSoldier->ubInsertionDirection = (UINT8)GetDirectionToGridNoFromGridNo( gMapInformation.sCenterGridNo, gMercPlacement[i].pSoldier->usStrategicInsertionData ) + 100;
|
||||||
}
|
}
|
||||||
|
else if(gfCenter && gGameExternalOptions.ubSkyriderHotLZ == 1 && gMercPlacement[i].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gMercPlacement[ i ].pSoldier->usStrategicInsertionData = ChooseMapEdgepoint( &gMercPlacement[ i ].ubStrategicInsertionCode, lastValidICode );
|
gMercPlacement[ i ].pSoldier->usStrategicInsertionData = ChooseMapEdgepoint( &gMercPlacement[ i ].ubStrategicInsertionCode, lastValidICode );
|
||||||
@@ -1545,7 +1546,7 @@ void MercClickCallback( MOUSE_REGION *reg, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( gbSelectedMercID != i )
|
if( gbSelectedMercID != i )
|
||||||
{
|
{
|
||||||
if ( gGameExternalOptions.ubSkyriderHotLZ == 3 && gMercPlacement[ i ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
if ((gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && gMercPlacement[ i ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
||||||
gubDefaultButton = GROUP_BUTTON;
|
gubDefaultButton = GROUP_BUTTON;
|
||||||
|
|
||||||
gbSelectedMercID = i;
|
gbSelectedMercID = i;
|
||||||
@@ -1568,7 +1569,7 @@ void SelectNextUnplacedUnit()
|
|||||||
if( gbSelectedMercID == -1 )
|
if( gbSelectedMercID == -1 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( gGameExternalOptions.ubSkyriderHotLZ == 3 && gMercPlacement[ gbSelectedMercID ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
if ((gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && gMercPlacement[ gbSelectedMercID ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
||||||
gubDefaultButton = GROUP_BUTTON;
|
gubDefaultButton = GROUP_BUTTON;
|
||||||
|
|
||||||
for( i = gbSelectedMercID; i < giPlacements; ++i )
|
for( i = gbSelectedMercID; i < giPlacements; ++i )
|
||||||
@@ -1624,7 +1625,7 @@ void HandleTacticalPlacementClicksInOverheadMap( MOUSE_REGION *reg, INT32 reason
|
|||||||
{
|
{
|
||||||
if( gbSelectedMercID != -1 )
|
if( gbSelectedMercID != -1 )
|
||||||
{
|
{
|
||||||
if ( gGameExternalOptions.ubSkyriderHotLZ == 3 && gMercPlacement[ gbSelectedMercID ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
if ((gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && gMercPlacement[ gbSelectedMercID ].pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
||||||
gubDefaultButton = GROUP_BUTTON;
|
gubDefaultButton = GROUP_BUTTON;
|
||||||
|
|
||||||
if( GetOverheadMouseGridNo( &sGridNo ) )
|
if( GetOverheadMouseGridNo( &sGridNo ) )
|
||||||
@@ -1773,7 +1774,7 @@ void PutDownMercPiece( INT32 iPlacement )
|
|||||||
if(!TileIsOutOfBounds(sGridNo))
|
if(!TileIsOutOfBounds(sGridNo))
|
||||||
{
|
{
|
||||||
// Flugente: initiate airdrop, place merc on roof if necessary
|
// Flugente: initiate airdrop, place merc on roof if necessary
|
||||||
if ( gGameExternalOptions.ubSkyriderHotLZ == 3 && pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
if ((gGameExternalOptions.ubSkyriderHotLZ == 1 || gGameExternalOptions.ubSkyriderHotLZ == 3) && pSoldier->usSoldierFlagMask & SOLDIER_AIRDROP )
|
||||||
{
|
{
|
||||||
// hideous hack
|
// hideous hack
|
||||||
gfTacticalDoHeliRun = TRUE;
|
gfTacticalDoHeliRun = TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user