mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +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:
@@ -8320,7 +8320,7 @@ INT32 BulletImpact( SOLDIERTYPE *pFirer, BULLET *pBullet, SOLDIERTYPE * pTarget,
|
||||
}
|
||||
}
|
||||
|
||||
if (iImpactForCrits > 0 && iImpactForCrits < pTarget->stats.bLife && !(pTarget->flags.uiStatusFlags & SOLDIER_MONSTER) && !(pTarget->flags.uiStatusFlags & SOLDIER_VEHICLE)) // not to monsters - SANDRO
|
||||
if (iImpactForCrits > 0 && iImpactForCrits < pTarget->stats.bLife && !(pTarget->flags.uiStatusFlags & SOLDIER_MONSTER) && !(pTarget->flags.uiStatusFlags & SOLDIER_VEHICLE) && (!(gTacticalStatus.uiFlags & GODMODE) || pTarget->bTeam != OUR_TEAM))
|
||||
{
|
||||
UINT32 uiCritChance = 0;
|
||||
if (fFragment)
|
||||
@@ -8342,11 +8342,6 @@ 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