mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Fix power gen fan sound
* Stop fan sound when switching sector * Start fan sound when loading a save where current sector is power gen sector
This commit is contained in:
@@ -1247,7 +1247,6 @@ BOOLEAN LoadJa25SaveInfoFromSavedGame( HWFILE hFile )
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
gJa25SaveStruct.iPowerGenFanPositionSndID = -1;
|
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2996,6 +2996,15 @@ BOOLEAN EnterSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
|
|||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
//Ja25 No meanwhiles
|
//Ja25 No meanwhiles
|
||||||
|
// But DO check if powergen fan sound needs to be restarted
|
||||||
|
extern UINT32 SECTOR_FAN_X;
|
||||||
|
extern UINT32 SECTOR_FAN_Y;
|
||||||
|
extern UINT32 SECTOR_FAN_Z;
|
||||||
|
|
||||||
|
if (gWorldSectorX == SECTOR_FAN_X && gWorldSectorY == SECTOR_FAN_Y && gbWorldSectorZ == SECTOR_FAN_Z)
|
||||||
|
{
|
||||||
|
HandlePowerGenFanSoundModification();
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if ( AreInMeanwhile( ) == FALSE )
|
if ( AreInMeanwhile( ) == FALSE )
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -3420,7 +3420,10 @@ void TrashWorld( void )
|
|||||||
//Remove the schedules
|
//Remove the schedules
|
||||||
DestroyAllSchedules();
|
DestroyAllSchedules();
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
//Ja25 no meanwhiles
|
//Ja25 no meanwhiles
|
||||||
|
// But DO turn off powergen fan sound
|
||||||
|
extern void HandleRemovingPowerGenFanSound();
|
||||||
|
HandleRemovingPowerGenFanSound();
|
||||||
#else
|
#else
|
||||||
// on trash world sheck if we have to set up the first meanwhile
|
// on trash world sheck if we have to set up the first meanwhile
|
||||||
HandleFirstMeanWhileSetUpWithTrashWorld( );
|
HandleFirstMeanWhileSetUpWithTrashWorld( );
|
||||||
|
|||||||
Reference in New Issue
Block a user