From e24d0cfd46eef2e8abdda2302bbcc345f9d03d46 Mon Sep 17 00:00:00 2001 From: BjossiAlfreds Date: Mon, 23 Sep 2019 19:48:41 +0000 Subject: [PATCH] Investigated PVS report for g_combat and eliminated the unnecessary sub-expressions --- src/g_combat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/g_combat.c b/src/g_combat.c index fc6bac7..80abe7e 100644 --- a/src/g_combat.c +++ b/src/g_combat.c @@ -475,7 +475,7 @@ M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor) and can't see who you should be mad at (attacker) attack the tesla also, target the tesla if it's a "new" tesla */ - if ((inflictor) && (!strcmp(inflictor->classname, "tesla"))) + if (!strcmp(inflictor->classname, "tesla")) { new_tesla = MarkTeslaArea(targ, inflictor); @@ -515,7 +515,7 @@ M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor) { percentHealth = (float)(targ->health) / (float)(targ->max_health); - if (targ->enemy->inuse && (percentHealth > 0.33)) + if (percentHealth > 0.33) { return; } @@ -607,7 +607,7 @@ M_ReactToDamage(edict_t *targ, edict_t *attacker, edict_t *inflictor) } } /* otherwise get mad at whoever they are mad at (help our buddy) unless it is us! */ - else if (attacker->enemy && (attacker->enemy != targ)) + else if (attacker->enemy) { if (targ->enemy && targ->enemy->client) {