mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Check if God mode is one before even going to NiGHTS or player vs player damaging code or whatever.
This commit is contained in:
parent
7dcf0d3d09
commit
175561cc7f
1 changed files with 4 additions and 5 deletions
|
@ -2383,8 +2383,7 @@ static inline void P_NiGHTSDamage(mobj_t *target, mobj_t *source)
|
||||||
player_t *player = target->player;
|
player_t *player = target->player;
|
||||||
tic_t oldnightstime = player->nightstime;
|
tic_t oldnightstime = player->nightstime;
|
||||||
|
|
||||||
if (!player->powers[pw_flashing]
|
if (!player->powers[pw_flashing])
|
||||||
&& !(player->pflags & PF_GODMODE))
|
|
||||||
{
|
{
|
||||||
angle_t fa;
|
angle_t fa;
|
||||||
|
|
||||||
|
@ -2891,6 +2890,9 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
if (player->exiting)
|
if (player->exiting)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (player->pflags & PF_GODMODE)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!(target->player->pflags & (PF_NIGHTSMODE|PF_NIGHTSFALL)) && (maptol & TOL_NIGHTS))
|
if (!(target->player->pflags & (PF_NIGHTSMODE|PF_NIGHTSFALL)) && (maptol & TOL_NIGHTS))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -2953,9 +2955,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!force && player->pflags & PF_GODMODE)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Instant-Death
|
// Instant-Death
|
||||||
if (damagetype & DMG_DEATHMASK)
|
if (damagetype & DMG_DEATHMASK)
|
||||||
P_KillPlayer(player, source, damage);
|
P_KillPlayer(player, source, damage);
|
||||||
|
|
Loading…
Reference in a new issue