mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
Remove unnecessary FriendlyFire global
This commit is contained in:
parent
389ff4fc98
commit
b87435ac9d
1 changed files with 1 additions and 7 deletions
|
@ -74,7 +74,6 @@ EXTERN_CVAR (Bool, show_obituaries)
|
||||||
|
|
||||||
|
|
||||||
FName MeansOfDeath;
|
FName MeansOfDeath;
|
||||||
bool FriendlyFire;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// GET STUFF
|
// GET STUFF
|
||||||
|
@ -198,10 +197,8 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
|
||||||
if (inflictor && inflictor->player && inflictor->player->mo != inflictor)
|
if (inflictor && inflictor->player && inflictor->player->mo != inflictor)
|
||||||
MeansOfDeath = NAME_None;
|
MeansOfDeath = NAME_None;
|
||||||
|
|
||||||
if (multiplayer && !deathmatch)
|
friendly = (self->player != attacker->player && self->IsTeammate(attacker));
|
||||||
FriendlyFire = true;
|
|
||||||
|
|
||||||
friendly = FriendlyFire;
|
|
||||||
mod = MeansOfDeath;
|
mod = MeansOfDeath;
|
||||||
message = NULL;
|
message = NULL;
|
||||||
messagename = NULL;
|
messagename = NULL;
|
||||||
|
@ -1024,7 +1021,6 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
||||||
}
|
}
|
||||||
|
|
||||||
MeansOfDeath = mod;
|
MeansOfDeath = mod;
|
||||||
FriendlyFire = false;
|
|
||||||
// [RH] Andy Baker's Stealth monsters
|
// [RH] Andy Baker's Stealth monsters
|
||||||
if (target->flags & MF_STEALTH)
|
if (target->flags & MF_STEALTH)
|
||||||
{
|
{
|
||||||
|
@ -1221,8 +1217,6 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
||||||
((player && player != source->player) || (!player && target != source)) &&
|
((player && player != source->player) || (!player && target != source)) &&
|
||||||
target->IsTeammate (source))
|
target->IsTeammate (source))
|
||||||
{
|
{
|
||||||
if (player)
|
|
||||||
FriendlyFire = true;
|
|
||||||
if (rawdamage < TELEFRAG_DAMAGE) //Use the original damage to check for telefrag amount. Don't let the now-amplified damagetypes do it.
|
if (rawdamage < TELEFRAG_DAMAGE) //Use the original damage to check for telefrag amount. Don't let the now-amplified damagetypes do it.
|
||||||
{ // Still allow telefragging :-(
|
{ // Still allow telefragging :-(
|
||||||
damage = (int)((float)damage * level.teamdamage);
|
damage = (int)((float)damage * level.teamdamage);
|
||||||
|
|
Loading…
Reference in a new issue