mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
1. Feature - Spooky creature music now plays when zombies are present
2. Bugfix - CheckForFullStruct in Soldier Control.cpp was referencing NUMBEROFTILES instead of new global variable git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5323 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -820,6 +820,7 @@ void EndMeanwhile( )
|
||||
{
|
||||
// We leave this sector open for our POWs to escape!
|
||||
// Set music mode to enemy present!
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
// ATE: Restore people to saved positions...
|
||||
|
||||
@@ -867,6 +867,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
||||
//Disable the options button when the auto resolve screen comes up
|
||||
EnableDisAbleMapScreenOptionsButton( FALSE );
|
||||
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
#ifdef JA2UB
|
||||
|
||||
@@ -959,6 +959,7 @@ void PrepareForPreBattleInterface( GROUP *pPlayerDialogGroup, GROUP *pInitiating
|
||||
}
|
||||
|
||||
//Set music
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
if( gfTacticalTraversal && pInitiatingBattleGroup == gpTacticalTraversalGroup ||
|
||||
|
||||
@@ -908,6 +908,7 @@ void HandleFirstHeliDropOfGame( )
|
||||
// Say quote.....
|
||||
SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
||||
// Start music
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -6181,6 +6181,7 @@ void ExitCombatMode( )
|
||||
// unused
|
||||
//gfForceMusicToTense = TRUE;
|
||||
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
BetweenTurnsVisibilityAdjustments();
|
||||
@@ -6239,6 +6240,7 @@ void SetEnemyPresence( )
|
||||
|
||||
#endif
|
||||
{
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = false"));
|
||||
sniperwarning = FALSE;
|
||||
@@ -6576,6 +6578,7 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
||||
// Begin tense music....
|
||||
// unused
|
||||
//gfForceMusicToTense = TRUE;
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
return( TRUE );
|
||||
@@ -9276,6 +9279,28 @@ BOOLEAN HostileBloodcatsPresent( void )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN HostileZombiesPresent( void )
|
||||
{
|
||||
INT32 iLoop;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
|
||||
if ( gTacticalStatus.Team[ CREATURE_TEAM ].bTeamActive == FALSE )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
for ( iLoop = gTacticalStatus.Team[ CREATURE_TEAM ].bFirstID; iLoop <= gTacticalStatus.Team[ CREATURE_TEAM ].bLastID; iLoop++ )
|
||||
{
|
||||
pSoldier = MercPtrs[ iLoop ];
|
||||
|
||||
if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife > 0 && pSoldier->IsZombie() )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
void HandleCreatureTenseQuote( )
|
||||
{
|
||||
|
||||
@@ -362,6 +362,8 @@ void DoPOWPathChecks( void );
|
||||
BOOLEAN HostileCiviliansWithGunsPresent( void );
|
||||
BOOLEAN HostileCiviliansPresent( void );
|
||||
BOOLEAN HostileBloodcatsPresent( void );
|
||||
BOOLEAN HostileZombiesPresent( void );
|
||||
|
||||
UINT8 NumPCsInSector( void );
|
||||
|
||||
void SetSoldierNonNeutral( SOLDIERTYPE * pSoldier );
|
||||
|
||||
@@ -10687,7 +10687,7 @@ BOOLEAN CheckForFullStruct( INT32 sGridNo, UINT16 *pusIndex )
|
||||
while( pStruct != NULL )
|
||||
{
|
||||
|
||||
if ( pStruct->usIndex != NO_TILE && pStruct->usIndex < NUMBEROFTILES )
|
||||
if ( pStruct->usIndex != NO_TILE && pStruct->usIndex < giNumberOfTiles )
|
||||
{
|
||||
|
||||
GetTileFlags( pStruct->usIndex, &fTileFlags );
|
||||
|
||||
@@ -579,8 +579,6 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
|
||||
*pubID = NOBODY;
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("TacticalCreateSoldier"));
|
||||
|
||||
|
||||
|
||||
INT8 tbTeam;
|
||||
BOOLEAN tfPP;
|
||||
tbTeam=pCreateStruct->bTeam;
|
||||
|
||||
@@ -798,8 +798,8 @@ void CreateTileDatabase( )
|
||||
|
||||
//Calculate mem usgae
|
||||
gSurfaceMemUsage = guiMemTotal - gSurfaceMemUsage;
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Sizes: %d vs %d", gTileDatabaseSize, NUMBEROFTILES ) );
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Types: %d", NUMBEROFTILETYPES ) );
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Sizes: %d vs %d", gTileDatabaseSize, giNumberOfTiles ) );
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Types: %d", giNumberOfTileTypes ) );
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Item Mem: %d", gTileDatabaseSize * sizeof( TILE_ELEMENT ) ) );
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Item Total Mem: %d", gSurfaceMemUsage ) );
|
||||
|
||||
|
||||
@@ -301,10 +301,10 @@ BOOLEAN InitializeWorld( )
|
||||
memset( TileSurfaceFilenames, '\0', sizeof( TileSurfaceFilenames ) );
|
||||
|
||||
// ATE: MEMSET LOG HEIGHT VALUES
|
||||
memset( gTileTypeLogicalHeight, 1, sizeof( gTileTypeLogicalHeight ) );
|
||||
memset( gTileTypeLogicalHeight, 1, sizeof( gTileTypeLogicalHeight) );
|
||||
|
||||
// Memset tile database
|
||||
memset( gTileDatabase, 0, sizeof( gTileDatabase ) );
|
||||
memset( gTileDatabase, 0, sizeof(gTileDatabase) );
|
||||
|
||||
// Init surface list
|
||||
memset( gTileSurfaceArray, 0, sizeof( gTileSurfaceArray ) );
|
||||
|
||||
Reference in New Issue
Block a user