mirror of https://github.com/yquake2/xatrix.git
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:
parent
f97f46f91d
commit
4c65436342
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue