mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +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!
|
// We leave this sector open for our POWs to escape!
|
||||||
// Set music mode to enemy present!
|
// Set music mode to enemy present!
|
||||||
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
// ATE: Restore people to saved positions...
|
// 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
|
//Disable the options button when the auto resolve screen comes up
|
||||||
EnableDisAbleMapScreenOptionsButton( FALSE );
|
EnableDisAbleMapScreenOptionsButton( FALSE );
|
||||||
|
|
||||||
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
|
|||||||
@@ -959,6 +959,7 @@ void PrepareForPreBattleInterface( GROUP *pPlayerDialogGroup, GROUP *pInitiating
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Set music
|
//Set music
|
||||||
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
if( gfTacticalTraversal && pInitiatingBattleGroup == gpTacticalTraversalGroup ||
|
if( gfTacticalTraversal && pInitiatingBattleGroup == gpTacticalTraversalGroup ||
|
||||||
|
|||||||
@@ -908,6 +908,7 @@ void HandleFirstHeliDropOfGame( )
|
|||||||
// Say quote.....
|
// Say quote.....
|
||||||
SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
SayQuoteFromAnyBodyInSector( QUOTE_ENEMY_PRESENCE );
|
||||||
// Start music
|
// Start music
|
||||||
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -6181,6 +6181,7 @@ void ExitCombatMode( )
|
|||||||
// unused
|
// unused
|
||||||
//gfForceMusicToTense = TRUE;
|
//gfForceMusicToTense = TRUE;
|
||||||
|
|
||||||
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
BetweenTurnsVisibilityAdjustments();
|
BetweenTurnsVisibilityAdjustments();
|
||||||
@@ -6239,6 +6240,7 @@ void SetEnemyPresence( )
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = false"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("SetEnemyPresence: warnings = false"));
|
||||||
sniperwarning = FALSE;
|
sniperwarning = FALSE;
|
||||||
@@ -6576,6 +6578,7 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen )
|
|||||||
// Begin tense music....
|
// Begin tense music....
|
||||||
// unused
|
// unused
|
||||||
//gfForceMusicToTense = TRUE;
|
//gfForceMusicToTense = TRUE;
|
||||||
|
UseCreatureMusic(HostileZombiesPresent());
|
||||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
@@ -9276,6 +9279,28 @@ BOOLEAN HostileBloodcatsPresent( void )
|
|||||||
return( FALSE );
|
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( )
|
void HandleCreatureTenseQuote( )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -362,6 +362,8 @@ void DoPOWPathChecks( void );
|
|||||||
BOOLEAN HostileCiviliansWithGunsPresent( void );
|
BOOLEAN HostileCiviliansWithGunsPresent( void );
|
||||||
BOOLEAN HostileCiviliansPresent( void );
|
BOOLEAN HostileCiviliansPresent( void );
|
||||||
BOOLEAN HostileBloodcatsPresent( void );
|
BOOLEAN HostileBloodcatsPresent( void );
|
||||||
|
BOOLEAN HostileZombiesPresent( void );
|
||||||
|
|
||||||
UINT8 NumPCsInSector( void );
|
UINT8 NumPCsInSector( void );
|
||||||
|
|
||||||
void SetSoldierNonNeutral( SOLDIERTYPE * pSoldier );
|
void SetSoldierNonNeutral( SOLDIERTYPE * pSoldier );
|
||||||
|
|||||||
@@ -10687,7 +10687,7 @@ BOOLEAN CheckForFullStruct( INT32 sGridNo, UINT16 *pusIndex )
|
|||||||
while( pStruct != NULL )
|
while( pStruct != NULL )
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( pStruct->usIndex != NO_TILE && pStruct->usIndex < NUMBEROFTILES )
|
if ( pStruct->usIndex != NO_TILE && pStruct->usIndex < giNumberOfTiles )
|
||||||
{
|
{
|
||||||
|
|
||||||
GetTileFlags( pStruct->usIndex, &fTileFlags );
|
GetTileFlags( pStruct->usIndex, &fTileFlags );
|
||||||
|
|||||||
@@ -579,8 +579,6 @@ SOLDIERTYPE* TacticalCreateSoldier( SOLDIERCREATE_STRUCT *pCreateStruct, UINT8 *
|
|||||||
*pubID = NOBODY;
|
*pubID = NOBODY;
|
||||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("TacticalCreateSoldier"));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("TacticalCreateSoldier"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT8 tbTeam;
|
INT8 tbTeam;
|
||||||
BOOLEAN tfPP;
|
BOOLEAN tfPP;
|
||||||
tbTeam=pCreateStruct->bTeam;
|
tbTeam=pCreateStruct->bTeam;
|
||||||
|
|||||||
@@ -798,8 +798,8 @@ void CreateTileDatabase( )
|
|||||||
|
|
||||||
//Calculate mem usgae
|
//Calculate mem usgae
|
||||||
gSurfaceMemUsage = guiMemTotal - gSurfaceMemUsage;
|
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 Sizes: %d vs %d", gTileDatabaseSize, giNumberOfTiles ) );
|
||||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Types: %d", NUMBEROFTILETYPES ) );
|
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 Mem: %d", gTileDatabaseSize * sizeof( TILE_ELEMENT ) ) );
|
||||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Item Total Mem: %d", gSurfaceMemUsage ) );
|
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("Database Item Total Mem: %d", gSurfaceMemUsage ) );
|
||||||
|
|
||||||
|
|||||||
@@ -301,10 +301,10 @@ BOOLEAN InitializeWorld( )
|
|||||||
memset( TileSurfaceFilenames, '\0', sizeof( TileSurfaceFilenames ) );
|
memset( TileSurfaceFilenames, '\0', sizeof( TileSurfaceFilenames ) );
|
||||||
|
|
||||||
// ATE: MEMSET LOG HEIGHT VALUES
|
// ATE: MEMSET LOG HEIGHT VALUES
|
||||||
memset( gTileTypeLogicalHeight, 1, sizeof( gTileTypeLogicalHeight ) );
|
memset( gTileTypeLogicalHeight, 1, sizeof( gTileTypeLogicalHeight) );
|
||||||
|
|
||||||
// Memset tile database
|
// Memset tile database
|
||||||
memset( gTileDatabase, 0, sizeof( gTileDatabase ) );
|
memset( gTileDatabase, 0, sizeof(gTileDatabase) );
|
||||||
|
|
||||||
// Init surface list
|
// Init surface list
|
||||||
memset( gTileSurfaceArray, 0, sizeof( gTileSurfaceArray ) );
|
memset( gTileSurfaceArray, 0, sizeof( gTileSurfaceArray ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user