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;
|
||||
tic_t oldnightstime = player->nightstime;
|
||||
|
||||
if (!player->powers[pw_flashing]
|
||||
&& !(player->pflags & PF_GODMODE))
|
||||
if (!player->powers[pw_flashing])
|
||||
{
|
||||
angle_t fa;
|
||||
|
||||
|
@ -2891,6 +2890,9 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
if (player->exiting)
|
||||
return false;
|
||||
|
||||
if (player->pflags & PF_GODMODE)
|
||||
return false;
|
||||
|
||||
if (!(target->player->pflags & (PF_NIGHTSMODE|PF_NIGHTSFALL)) && (maptol & TOL_NIGHTS))
|
||||
return false;
|
||||
|
||||
|
@ -2953,9 +2955,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!force && player->pflags & PF_GODMODE)
|
||||
return false;
|
||||
|
||||
// Instant-Death
|
||||
if (damagetype & DMG_DEATHMASK)
|
||||
P_KillPlayer(player, source, damage);
|
||||
|
|
Loading…
Reference in a new issue