new cheat command CTRL+SHIFT+g = god mode (invulnerability) requested by Parkan, works in both tactical and strategic

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9097 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-06-21 21:15:17 +00:00
parent fd528e418c
commit bdbe1ffe65
4 changed files with 34 additions and 2 deletions
+7
View File
@@ -1713,6 +1713,7 @@ PaletteReplacementType *guipPaletteReplacements = NULL;
extern BOOLEAN fReDrawFace;
extern UINT8 gubWaitingForAllMercsToExitCode;
BOOLEAN gfGetNewPathThroughPeople = FALSE;
BOOLEAN gfGodModeCheat = FALSE;
// LOCAL FUNCTIONS
// DO NOT CALL UNLESS THROUGH EVENT_SetSoldierPosition
@@ -10315,6 +10316,12 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
}
}
}
if (gfGodModeCheat && this->bTeam == OUR_TEAM)
{
sLifeDeduct = 0;
sBreathLoss = 0;
}
// Deduct life!, Show damage if we want!
bOldLife = this->stats.bLife;