Remove unnecessary FriendlyFire global

This commit is contained in:
Edward Richardson 2015-08-30 22:56:34 +12:00
parent 389ff4fc98
commit b87435ac9d

View file

@ -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);