mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
godmode reworked: reused existing mechanism in code = same functionality, less code changes, also when enabled GOD MODE text will now show up in left corner in red color, this was already there I just uncommented it
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9128 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4782,7 +4782,7 @@ void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
|
||||
|
||||
// WANNE: Why is impact here always set to 0? The impact was calculated a few lines before!
|
||||
//iImpact = 0;
|
||||
if (gfGodModeCheat && pTarget->pSoldier->bTeam == OUR_TEAM)
|
||||
if (gTacticalStatus.uiFlags & GODMODE && pTarget->pSoldier->bTeam == OUR_TEAM)
|
||||
{
|
||||
iImpact = 0;
|
||||
}
|
||||
@@ -5005,7 +5005,7 @@ void TargetHitCallback( SOLDIERCELL *pTarget, INT32 index )
|
||||
break;
|
||||
}
|
||||
|
||||
if (gfGodModeCheat && pTarget->pSoldier->bTeam == OUR_TEAM)
|
||||
if (gTacticalStatus.uiFlags & GODMODE && pTarget->pSoldier->bTeam == OUR_TEAM)
|
||||
{
|
||||
iNewLife = pTarget->pSoldier->stats.bLife;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,6 @@ extern BOOLEAN gfGamePaused;
|
||||
extern UNDERGROUND_SECTORINFO* FindUnderGroundSector( INT16 sMapX, INT16 sMapY, UINT8 bMapZ );
|
||||
|
||||
UINT8 gubCheatLevel = STARTING_CHEAT_LEVEL;
|
||||
BOOLEAN gfGodModeCheat = FALSE;
|
||||
|
||||
UINT8 gubScreenCount=0;
|
||||
|
||||
@@ -1231,7 +1230,6 @@ void ReStartingGame()
|
||||
gubCheatLevel = STARTING_CHEAT_LEVEL;
|
||||
else
|
||||
gubCheatLevel = 0;
|
||||
gfGodModeCheat = FALSE;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+10
-2
@@ -7780,8 +7780,16 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
{
|
||||
if (CHEATER_CHEAT_LEVEL())
|
||||
{
|
||||
ScreenMsg(FONT_MCOLOR_RED, MSG_INTERFACE, gfGodModeCheat ? L"God mode deactivated." : L"God mode activated.");
|
||||
gfGodModeCheat = !gfGodModeCheat;
|
||||
if (gTacticalStatus.uiFlags & GODMODE)
|
||||
{
|
||||
//ScreenMsg(FONT_MCOLOR_RED, MSG_INTERFACE, L"God mode deactivated.");
|
||||
gTacticalStatus.uiFlags &= (~GODMODE);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ScreenMsg(FONT_MCOLOR_RED, MSG_INTERFACE, L"God mode activated.");
|
||||
gTacticalStatus.uiFlags |= GODMODE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user