0
0
Fork 0
mirror of https://github.com/yquake2/rogue.git synced 2025-04-11 12:31:13 +00:00

Fixed doors being unusable with NULL activator

This commit is contained in:
BjossiAlfreds 2025-02-24 15:54:16 +00:00
parent 89320081fb
commit e84a19865d

View file

@ -2266,7 +2266,7 @@ door_use(edict_t *self, edict_t *other /* unused */, edict_t *activator)
edict_t *ent;
vec3_t center;
if (!self || !activator)
if (!self)
{
return;
}
@ -3443,13 +3443,22 @@ trigger_elevator_use(edict_t *self, edict_t *other,
edict_t *activator /* unused */)
{
edict_t *target;
edict_t *train;
if (!self || !other)
{
return;
}
if (self->movetarget->nextthink)
train = self->movetarget;
if (!train || !train->inuse ||
!train->classname || strcmp(train->classname, "func_train") != 0)
{
return;
}
if (train->nextthink)
{
return;
}
@ -3469,8 +3478,8 @@ trigger_elevator_use(edict_t *self, edict_t *other,
return;
}
self->movetarget->target_ent = target;
train_resume(self->movetarget);
train->target_ent = target;
train_resume(train);
}
void