mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
**********************************************************
** Big Maps Projects code (incl. Multiplayer v1.5 ** ********************************************************** - Merged Big Maps Project code from BMP+MP trunk (Revision: 3340) o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - Before THIS merge, I made a branch of the existing 1.13 source o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src - Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago - I will add VS 2010 projects and solution file in the next few days git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+45
-44
@@ -73,7 +73,7 @@ extern INT32 giGarrisonArraySize;
|
||||
extern BOOLEAN gfOverrideSector;
|
||||
#endif
|
||||
|
||||
INT16 gsInterrogationGridNo[3] = { 7756, 7757, 7758 };
|
||||
INT32 gsInterrogationGridNo[3] = { 7756, 7757, 7758 };
|
||||
|
||||
|
||||
extern void Ensure_RepairedGarrisonGroup( GARRISON_GROUP **ppGarrison, INT32 *pGarraySize );
|
||||
@@ -210,15 +210,15 @@ UINT8 NumEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
|
||||
GROUP *pGroup;
|
||||
UINT8 ubNumTroops;
|
||||
|
||||
// HEADROCK HAM 3.5: This is a TEMPORARY fix to avoid the assertion error. Not sure this is the best solution,
|
||||
// probably isn't. But I need this bit to work.
|
||||
if (sSectorX < MINIMUM_VALID_X_COORDINATE ||
|
||||
sSectorX > MAXIMUM_VALID_X_COORDINATE ||
|
||||
sSectorY < MINIMUM_VALID_Y_COORDINATE ||
|
||||
sSectorY > MAXIMUM_VALID_Y_COORDINATE)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
// HEADROCK: This is a TEMPORARY fix to avoid the assertion error. Not sure this is the best solution,
|
||||
// probably isn't. But I need this bit to work.
|
||||
if (sSectorX < MINIMUM_VALID_X_COORDINATE ||
|
||||
sSectorX > MAXIMUM_VALID_X_COORDINATE ||
|
||||
sSectorY < MINIMUM_VALID_Y_COORDINATE ||
|
||||
sSectorY > MAXIMUM_VALID_Y_COORDINATE)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
AssertGE( sSectorX, MINIMUM_VALID_X_COORDINATE);
|
||||
AssertLE( sSectorX, MAXIMUM_VALID_X_COORDINATE );
|
||||
@@ -587,35 +587,35 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
else
|
||||
{
|
||||
|
||||
if( pSector->uiFlags & SF_USE_MAP_SETTINGS )
|
||||
{ //count the number of enemy placements in a map and use those
|
||||
SOLDIERINITNODE *curr = gSoldierInitHead;
|
||||
ubTotalAdmins = ubTotalTroops = ubTotalElites = 0;
|
||||
while( curr )
|
||||
{
|
||||
if( curr->pBasicPlacement->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
switch( curr->pBasicPlacement->ubSoldierClass )
|
||||
{
|
||||
case SOLDIER_CLASS_ADMINISTRATOR: ubTotalAdmins++; break;
|
||||
case SOLDIER_CLASS_ARMY: ubTotalTroops++; break;
|
||||
case SOLDIER_CLASS_ELITE: ubTotalElites++; break;
|
||||
}
|
||||
}
|
||||
curr = curr->next;
|
||||
}
|
||||
pSector->ubNumAdmins = ubTotalAdmins;
|
||||
pSector->ubNumTroops = ubTotalTroops;
|
||||
pSector->ubNumElites = ubTotalElites;
|
||||
pSector->ubAdminsInBattle = 0;
|
||||
pSector->ubTroopsInBattle = 0;
|
||||
pSector->ubElitesInBattle = 0;
|
||||
}
|
||||
else
|
||||
if( pSector->uiFlags & SF_USE_MAP_SETTINGS )
|
||||
{ //count the number of enemy placements in a map and use those
|
||||
SOLDIERINITNODE *curr = gSoldierInitHead;
|
||||
ubTotalAdmins = ubTotalTroops = ubTotalElites = 0;
|
||||
while( curr )
|
||||
{
|
||||
ubTotalAdmins = pSector->ubNumAdmins - pSector->ubAdminsInBattle;
|
||||
ubTotalTroops = pSector->ubNumTroops - pSector->ubTroopsInBattle;
|
||||
ubTotalElites = pSector->ubNumElites - pSector->ubElitesInBattle;
|
||||
if( curr->pBasicPlacement->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
switch( curr->pBasicPlacement->ubSoldierClass )
|
||||
{
|
||||
case SOLDIER_CLASS_ADMINISTRATOR: ubTotalAdmins++; break;
|
||||
case SOLDIER_CLASS_ARMY: ubTotalTroops++; break;
|
||||
case SOLDIER_CLASS_ELITE: ubTotalElites++; break;
|
||||
}
|
||||
}
|
||||
curr = curr->next;
|
||||
}
|
||||
pSector->ubNumAdmins = ubTotalAdmins;
|
||||
pSector->ubNumTroops = ubTotalTroops;
|
||||
pSector->ubNumElites = ubTotalElites;
|
||||
pSector->ubAdminsInBattle = 0;
|
||||
pSector->ubTroopsInBattle = 0;
|
||||
pSector->ubElitesInBattle = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ubTotalAdmins = pSector->ubNumAdmins - pSector->ubAdminsInBattle;
|
||||
ubTotalTroops = pSector->ubNumTroops - pSector->ubTroopsInBattle;
|
||||
ubTotalElites = pSector->ubNumElites - pSector->ubElitesInBattle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -787,6 +787,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
continue;
|
||||
}
|
||||
|
||||
// At this point we should not have added more soldiers than are in slots
|
||||
AssertGT( sNumSlots, 0 );
|
||||
|
||||
switch( pSoldier->ubSoldierClass )
|
||||
@@ -1289,8 +1290,8 @@ void ProcessQueenCmdImplicationsOfDeath( SOLDIERTYPE *pSoldier )
|
||||
//identical, though it is highly likely that they will all be successfully added on the first call.
|
||||
void AddPossiblePendingEnemiesToBattle()
|
||||
{
|
||||
// check if no world is loaded
|
||||
if ( !gWorldSectorX && !gWorldSectorY && (gbWorldSectorZ == -1) )
|
||||
// Check if no world is loaded, and is not underground level
|
||||
if(!(gWorldSectorX > 0 && gWorldSectorY > 0 && gbWorldSectorZ == 0))//dnl ch57 161009
|
||||
return;
|
||||
|
||||
UINT8 ubSlots, ubNumAvailable;
|
||||
@@ -1392,7 +1393,6 @@ void AddPossiblePendingEnemiesToBattle()
|
||||
|
||||
if( ubStrategicInsertionCode == 255 )
|
||||
{
|
||||
// HEADROCK HAM 3.5: This runs into assertion errors along the map's edge! Should be fixed!
|
||||
if( NumEnemiesInSector( gWorldSectorX + 1, gWorldSectorY ) )
|
||||
ubStrategicInsertionCode = INSERTION_CODE_EAST;
|
||||
else if( NumEnemiesInSector( gWorldSectorX - 1, gWorldSectorY ) )
|
||||
@@ -1905,10 +1905,11 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
|
||||
INT32 iNumEnemiesInSector;
|
||||
|
||||
|
||||
static INT16 sAlmaCaptureGridNos[] = { 9208, 9688, 9215 };
|
||||
static INT16 sAlmaCaptureItemsGridNo[] = { 12246, 12406, 13046 };
|
||||
// TODO.WANNE: Hardcoded grid number
|
||||
static INT32 sAlmaCaptureGridNos[] = { 9208, 9688, 9215 };
|
||||
static INT32 sAlmaCaptureItemsGridNo[] = { 12246, 12406, 13046 };
|
||||
|
||||
static INT16 sInterrogationItemGridNo[] = { 12089, 12089, 12089 };
|
||||
static INT32 sInterrogationItemGridNo[] = { 12089, 12089, 12089 };
|
||||
|
||||
AssertNotNIL(pSoldier);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user