mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
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:
parent
9d827b13da
commit
a0cd32dddb
2 changed files with 2 additions and 7 deletions
|
@ -1378,7 +1378,7 @@ door_go_down(edict_t *self)
|
|||
void
|
||||
door_go_up(edict_t *self, edict_t *activator)
|
||||
{
|
||||
if (!self || !activator)
|
||||
if (!self)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -242,13 +242,8 @@ G_UseTargets(edict_t *ent, edict_t *activator)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!activator)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* 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 a new issue