mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
new feature: CHEAT_MODE, new option in Ja2_Options.ini to automatically enable cheat mode in every loaded game or new replay
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9096 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -885,6 +885,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.usWorkerTrainingPoints = iniReader.ReadInteger( "Financial Settings", "WORKER_TRAINING_POINTS", 100, 1, 250 );
|
gGameExternalOptions.usWorkerTrainingPoints = iniReader.ReadInteger( "Financial Settings", "WORKER_TRAINING_POINTS", 100, 1, 250 );
|
||||||
|
|
||||||
//################# Troubleshooting Settings #################
|
//################# Troubleshooting Settings #################
|
||||||
|
gGameExternalOptions.gfCheatMode = iniReader.ReadBoolean("Troubleshooting Settings", "CHEAT_MODE", FALSE, false);
|
||||||
|
|
||||||
gGameExternalOptions.gubDeadLockDelay = (UINT8) iniReader.ReadInteger("Troubleshooting Settings","DEAD_LOCK_DELAY",15, 5, 50);
|
gGameExternalOptions.gubDeadLockDelay = (UINT8) iniReader.ReadInteger("Troubleshooting Settings","DEAD_LOCK_DELAY",15, 5, 50);
|
||||||
gGameExternalOptions.gfEnableEmergencyButton_SkipStrategicEvents = iniReader.ReadBoolean("Troubleshooting Settings","ENABLE_EMERGENCY_BUTTON_NUMLOCK_TO_SKIP_STRATEGIC_EVENTS",0);
|
gGameExternalOptions.gfEnableEmergencyButton_SkipStrategicEvents = iniReader.ReadBoolean("Troubleshooting Settings","ENABLE_EMERGENCY_BUTTON_NUMLOCK_TO_SKIP_STRATEGIC_EVENTS",0);
|
||||||
|
|||||||
@@ -403,6 +403,7 @@ typedef struct
|
|||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
|
|
||||||
// System settings
|
// System settings
|
||||||
|
BOOLEAN gfCheatMode;
|
||||||
UINT8 gubDeadLockDelay;
|
UINT8 gubDeadLockDelay;
|
||||||
BOOLEAN gfEnableEmergencyButton_SkipStrategicEvents;
|
BOOLEAN gfEnableEmergencyButton_SkipStrategicEvents;
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -6733,7 +6733,10 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
#ifndef JA2TESTVERSION
|
#ifndef JA2TESTVERSION
|
||||||
RESET_CHEAT_LEVEL( );
|
if (gGameExternalOptions.gfCheatMode)
|
||||||
|
ACTIVATE_CHEAT_LEVEL();
|
||||||
|
else
|
||||||
|
RESET_CHEAT_LEVEL();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
|
|||||||
@@ -1224,7 +1224,9 @@ void ReStartingGame()
|
|||||||
gpCustomizableTimerCallback = NULL;
|
gpCustomizableTimerCallback = NULL;
|
||||||
|
|
||||||
// WANNE - MP: Set cheat level to 0 for mp
|
// WANNE - MP: Set cheat level to 0 for mp
|
||||||
if (!is_networked)
|
if (gGameExternalOptions.gfCheatMode)
|
||||||
|
gubCheatLevel = 6;
|
||||||
|
else if (!is_networked)
|
||||||
gubCheatLevel = STARTING_CHEAT_LEVEL;
|
gubCheatLevel = STARTING_CHEAT_LEVEL;
|
||||||
else
|
else
|
||||||
gubCheatLevel = 0;
|
gubCheatLevel = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user