Fix door_go_up() exiting early.

The problem in door_go_up() may prevent doors from crushing something
blocking them. While add it sanity check `activator` in
`G_UseTargets()`.
This commit is contained in:
Yamagi 2022-02-05 17:18:27 +01:00
parent f97f46f91d
commit 4c65436342
2 changed files with 2 additions and 2 deletions

View File

@ -1350,7 +1350,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

@ -210,7 +210,7 @@ G_UseTargets(edict_t *ent, edict_t *activator /* may be NULL */)
}
/* print the message */
if ((ent->message) && !(activator->svflags & SVF_MONSTER))
if (activator && (ent->message) && !(activator->svflags & SVF_MONSTER))
{
gi.centerprintf(activator, "%s", ent->message);