Investigated PVS report for g_items and addressed 2 issues

This commit is contained in:
BjossiAlfreds 2019-09-23 19:59:23 +00:00
parent e8637c02c6
commit c905e7ef1d

View file

@ -584,7 +584,7 @@ Pickup_Nuke(edict_t *ent, edict_t *other)
return false;
}
if ((coop->value) && (ent->item->flags & IT_STAY_COOP) && (quantity > 0))
if ((coop->value) && (ent->item->flags & IT_STAY_COOP))
{
return false;
}
@ -1209,6 +1209,11 @@ Drop_Ammo(edict_t *ent, gitem_t *item)
void
MegaHealth_think(edict_t *self)
{
if (!self)
{
return;
}
if (self->owner->health > self->owner->max_health)
{
self->nextthink = level.time + 1;
@ -1216,11 +1221,6 @@ MegaHealth_think(edict_t *self)
return;
}
if (!self)
{
return;
}
if (!(self->spawnflags & DROPPED_ITEM) && (deathmatch->value))
{
SetRespawn(self, 20);