mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Some cleanup and reordering
This commit is contained in:
parent
31b2919847
commit
a84c2c6081
1 changed files with 13 additions and 16 deletions
|
@ -2920,7 +2920,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
return false; // Don't hit yourself with your own paraloop, baka
|
return false; // Don't hit yourself with your own paraloop, baka
|
||||||
if (source && source->player && !cv_friendlyfire.value
|
if (source && source->player && !cv_friendlyfire.value
|
||||||
&& (gametype == GT_COOP
|
&& (gametype == GT_COOP
|
||||||
|| (G_GametypeHasTeams() && target->player->ctfteam == source->player->ctfteam)))
|
|| (G_GametypeHasTeams() && player->ctfteam == source->player->ctfteam)))
|
||||||
return false; // Don't run eachother over in special stages and team games and such
|
return false; // Don't run eachother over in special stages and team games and such
|
||||||
}
|
}
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
|
@ -2995,7 +2995,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
else if (LUAh_MobjDamage(target, inflictor, source, damage))
|
else if (LUAh_MobjDamage(target, inflictor, source, damage))
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
else if (!player->powers[pw_super] && (player->powers[pw_shield] || player->bot)) //If One-Hit Shield
|
else if (player->powers[pw_shield] || player->bot) //If One-Hit Shield
|
||||||
{
|
{
|
||||||
P_ShieldDamage(player, inflictor, source, damage, damagetype);
|
P_ShieldDamage(player, inflictor, source, damage, damagetype);
|
||||||
damage = 0;
|
damage = 0;
|
||||||
|
@ -3005,22 +3005,19 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
damage = player->rings;
|
damage = player->rings;
|
||||||
P_RingDamage(player, inflictor, source, damage, damagetype);
|
P_RingDamage(player, inflictor, source, damage, damagetype);
|
||||||
}
|
}
|
||||||
else // No shield, no rings, no invincibility.
|
|
||||||
{
|
|
||||||
// To reduce griefing potential, don't allow players to be killed
|
// To reduce griefing potential, don't allow players to be killed
|
||||||
// by friendly fire. Spilling their rings and other items is enough.
|
// by friendly fire. Spilling their rings and other items is enough.
|
||||||
if (force || !(G_GametypeHasTeams()
|
else if (!force && G_GametypeHasTeams()
|
||||||
&& source && source->player && (source->player->ctfteam == player->ctfteam)
|
&& source && source->player && (source->player->ctfteam == player->ctfteam)
|
||||||
&& cv_friendlyfire.value))
|
&& cv_friendlyfire.value)
|
||||||
{
|
|
||||||
damage = 1;
|
|
||||||
P_KillPlayer(player, source, damage);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
damage = 0;
|
damage = 0;
|
||||||
P_ShieldDamage(player, inflictor, source, damage, damagetype);
|
P_ShieldDamage(player, inflictor, source, damage, damagetype);
|
||||||
}
|
}
|
||||||
|
else // No shield, no rings, no invincibility.
|
||||||
|
{
|
||||||
|
damage = 1;
|
||||||
|
P_KillPlayer(player, source, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damagetype & DMG_DEATHMASK)
|
if (damagetype & DMG_DEATHMASK)
|
||||||
|
|
Loading…
Reference in a new issue