mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-25 21:51:22 +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
7d1007ea1e
commit
f63c952103
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue