mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
god mode cheat code tweaks + preventing ability damage
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9098 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
|
||||
#include "Language Defines.h"
|
||||
|
||||
extern UINT8 gubCheatLevel;
|
||||
extern UINT8 gubCheatLevel;
|
||||
extern BOOLEAN gfGodModeCheat;
|
||||
|
||||
// GLOBALS FOR CHEAT MODE......
|
||||
#ifdef JA2TESTVERSION
|
||||
|
||||
@@ -6737,6 +6737,7 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
||||
ACTIVATE_CHEAT_LEVEL();
|
||||
else
|
||||
RESET_CHEAT_LEVEL();
|
||||
gfGodModeCheat = FALSE;
|
||||
#endif
|
||||
|
||||
#ifdef JA2BETAVERSION
|
||||
|
||||
@@ -90,7 +90,6 @@ INT32 giMaxMilitiaToRender = 20;//Changes depending on merc amount
|
||||
|
||||
extern UINT8 gubReinforcementMinEnemyStaticGroupSize;
|
||||
extern BOOLEAN gfStrategicMilitiaChangesMade;
|
||||
extern BOOLEAN gfGodModeCheat;
|
||||
|
||||
extern void ResetMilitia();
|
||||
extern BOOLEAN AutoReload( SOLDIERTYPE *pSoldier );
|
||||
|
||||
@@ -103,7 +103,8 @@ extern BOOLEAN gfGamePaused;
|
||||
|
||||
extern UNDERGROUND_SECTORINFO* FindUnderGroundSector( INT16 sMapX, INT16 sMapY, UINT8 bMapZ );
|
||||
|
||||
UINT8 gubCheatLevel = STARTING_CHEAT_LEVEL;
|
||||
UINT8 gubCheatLevel = STARTING_CHEAT_LEVEL;
|
||||
BOOLEAN gfGodModeCheat = FALSE;
|
||||
|
||||
UINT8 gubScreenCount=0;
|
||||
|
||||
@@ -1230,6 +1231,7 @@ void ReStartingGame()
|
||||
gubCheatLevel = STARTING_CHEAT_LEVEL;
|
||||
else
|
||||
gubCheatLevel = 0;
|
||||
gfGodModeCheat = FALSE;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -708,7 +708,6 @@ extern CHAR16 gzUserDefinedButton1[ 128 ];
|
||||
extern CHAR16 gzUserDefinedButton2[ 128 ];
|
||||
|
||||
extern BOOLEAN gfMilitiaPopupCreated;
|
||||
extern BOOLEAN gfGodModeCheat;
|
||||
|
||||
#ifdef JA2TESTVERSION
|
||||
extern INT16 MSYS_CurrentMX;
|
||||
|
||||
@@ -1713,7 +1713,6 @@ PaletteReplacementType *guipPaletteReplacements = NULL;
|
||||
extern BOOLEAN fReDrawFace;
|
||||
extern UINT8 gubWaitingForAllMercsToExitCode;
|
||||
BOOLEAN gfGetNewPathThroughPeople = FALSE;
|
||||
BOOLEAN gfGodModeCheat = FALSE;
|
||||
|
||||
// LOCAL FUNCTIONS
|
||||
// DO NOT CALL UNLESS THROUGH EVENT_SetSoldierPosition
|
||||
|
||||
@@ -218,7 +218,6 @@ extern int iWindowedMode;
|
||||
extern OBJECTTYPE *gpItemDescObject;
|
||||
extern BOOLEAN gfInItemStackPopup;
|
||||
extern BOOLEAN gfInKeyRingPopup;
|
||||
extern BOOLEAN gfGodModeCheat;
|
||||
|
||||
|
||||
//Little functions called by keyboard input
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "sgp.h"
|
||||
#include "overhead types.h"
|
||||
#include "Sound Control.h"
|
||||
|
||||
#include "Cheats.h"
|
||||
#include "overhead.h"
|
||||
#include "Event Pump.h"
|
||||
#include "weapons.h"
|
||||
@@ -8343,6 +8343,11 @@ INT32 BulletImpact( SOLDIERTYPE *pFirer, BULLET *pBullet, SOLDIERTYPE * pTarget,
|
||||
}
|
||||
}
|
||||
|
||||
if (gfGodModeCheat && pTarget->bTeam == OUR_TEAM)
|
||||
{
|
||||
uiCritChance = 0;//no crit against player in god mode either
|
||||
}
|
||||
|
||||
// SANDRO - with new traits, the chance for stat loss is higher as we are now able to repair it
|
||||
if ((PreRandom( uiCritChance ) + 1) > (UINT8)(gGameOptions.fNewTraitSystem ? gSkillTraitValues.ubDamageNeededToLoseStats : CRITICAL_HIT_THRESHOLD))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user