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;
bool FriendlyFire;
//
// GET STUFF
@ -198,10 +197,8 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
if (inflictor && inflictor->player && inflictor->player->mo != inflictor)
MeansOfDeath = NAME_None;
if (multiplayer && !deathmatch)
FriendlyFire = true;
friendly = (self->player != attacker->player && self->IsTeammate(attacker));
friendly = FriendlyFire;
mod = MeansOfDeath;
message = NULL;
messagename = NULL;
@ -1024,7 +1021,6 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
}
MeansOfDeath = mod;
FriendlyFire = false;
// [RH] Andy Baker's Stealth monsters
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)) &&
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.
{ // Still allow telefragging :-(
damage = (int)((float)damage * level.teamdamage);