- New Feature/exploit enhancement: enter hostile sector with helicopter and land mercs anywhere (see http://www.bears-pit.com/board/ubbthreads.php/topics/327879.html#Post327879)

- MP entry points are now much more and scale with mapsize

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6576 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-11-10 19:35:13 +00:00
parent 899d0f15a0
commit 7e5cbd126a
11 changed files with 444 additions and 293 deletions
+23 -11
View File
@@ -22,6 +22,7 @@
#include "meanwhile.h"
#include "Exit Grids.h"
#include "Interface.h" // added by Flugente for zBackground
#include "renderworld.h" // added by Flugente
#endif
#ifdef JA2UB
@@ -1194,16 +1195,7 @@ BOOLEAN InternalAddSoldierToSector( UINT8 ubID, BOOLEAN fCalculateDirection, BOO
sGridNo = pSoldier->sInsertionGridNo;
}
}
// Flugente backgrounds
if ( pSoldier->ubStrategicInsertionCode == INSERTION_CODE_CENTER && pSoldier->GetBackgroundValue(BG_AIRDROP) )
{
fCalculateDirection = FALSE;
pSoldier->ubInsertionDirection = Random( DIRECTION_IRRELEVANT );
pSoldier->bSoldierFlagMask |= SOLDIER_AIRDROP_BONUS;
}
// add this flag whenever we enter strategically enter a sector (= we attack a sector)
pSoldier->bSoldierFlagMask |= SOLDIER_ASSAULT_BONUS;
@@ -1500,6 +1492,26 @@ void AddSoldierToSectorGridNo( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubDir
fUpdateFinalPosition = FALSE;
}
// Flugente: if we are airdropping, center screen on the action adn remove soldier initially. He will be dropped into the sector by the helicopter
if ( pSoldier->bSoldierFlagMask & SOLDIER_AIRDROP )
{
pSoldier->bSoldierFlagMask &= ~SOLDIER_AIRDROP;
if ( gGameExternalOptions.ubSkyriderHotLZ == 3 )
{
gfIgnoreScrolling = FALSE;
INT16 sNewCenterWorldX, sNewCenterWorldY;
ConvertGridNoToCenterCellXY( sGridNo, &sNewCenterWorldX, &sNewCenterWorldY );
SetRenderCenter( sNewCenterWorldX, sNewCenterWorldY );
gfIgnoreScrolling = TRUE;
pSoldier->RemoveSoldierFromGridNo( );
pSoldier->bInSector = FALSE;
return;
}
}
// If this is a special insertion location, get path!
if ( ubInsertionCode == INSERTION_CODE_ARRIVING_GAME )
@@ -1524,7 +1536,7 @@ void AddSoldierToSectorGridNo( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubDir
pSoldier->EVENT_SetSoldierDesiredDirection( ubDirection );
}
}
if( !(gTacticalStatus.uiFlags & LOADING_SAVED_GAME ) )
{
if ( !( pSoldier->flags.uiStatusFlags & SOLDIER_DEAD ) )