Fix door_go_up(), G_UseTargets() exiting early if no activator is given.

The problem in door_go_up() may prevent doors from crushing something
blocking them. The problem in G_UseTargets() may prevent targets from
getting killed or fired.

Pointed out by @maraakate.
This commit is contained in:
Yamagi 2022-02-05 17:24:28 +01:00
parent 7d1007ea1e
commit f63c952103
2 changed files with 3 additions and 3 deletions

View file

@ -2101,7 +2101,7 @@ door_go_down(edict_t *self)
void
door_go_up(edict_t *self, edict_t *activator)
{
if (!self || !activator)
if (!self)
{
return;
}

View file

@ -270,7 +270,7 @@ G_UseTargets(edict_t *ent, edict_t *activator)
edict_t *t;
edict_t *master;
if (!ent || !activator)
if (!ent)
{
return;
}
@ -292,7 +292,7 @@ G_UseTargets(edict_t *ent, edict_t *activator)
}
/* print the message */
if ((ent->message) && !(activator->svflags & SVF_MONSTER))
if (activator && (ent->message) && !(activator->svflags & SVF_MONSTER))
{
gi.centerprintf(activator, "%s", ent->message);