mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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:
@@ -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