mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-25 21:51:22 +00:00
Investigated PVS report for g_combat and eliminated the unnecessary sub-expressions
This commit is contained in:
parent
b7f6d9da91
commit
e24d0cfd46
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
and can't see who you should be mad at (attacker)
|
||||||
attack the tesla also, target the tesla if it's
|
attack the tesla also, target the tesla if it's
|
||||||
a "new" tesla */
|
a "new" tesla */
|
||||||
if ((inflictor) && (!strcmp(inflictor->classname, "tesla")))
|
if (!strcmp(inflictor->classname, "tesla"))
|
||||||
{
|
{
|
||||||
new_tesla = MarkTeslaArea(targ, inflictor);
|
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);
|
percentHealth = (float)(targ->health) / (float)(targ->max_health);
|
||||||
|
|
||||||
if (targ->enemy->inuse && (percentHealth > 0.33))
|
if (percentHealth > 0.33)
|
||||||
{
|
{
|
||||||
return;
|
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! */
|
/* 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)
|
if (targ->enemy && targ->enemy->client)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue