From 7e7c5f7fc0764d5599cb97ba411606dabc12d39c Mon Sep 17 00:00:00 2001 From: BjossiAlfreds Date: Wed, 15 Jan 2020 14:33:41 +0000 Subject: [PATCH] Small hotfix to make fixbot unstucking logic reachable --- src/monster/fixbot/fixbot.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/monster/fixbot/fixbot.c b/src/monster/fixbot/fixbot.c index b3111e4..33837d3 100644 --- a/src/monster/fixbot/fixbot.c +++ b/src/monster/fixbot/fixbot.c @@ -397,12 +397,10 @@ use_scanner(edict_t *self) if (VectorLength(vec) < 56) { self->monsterinfo.currentmove = &fixbot_move_weld_start; + return; } - - return; } - - if (strcmp(self->goalentity->classname, "bot_goal") == 0) + else if (strcmp(self->goalentity->classname, "bot_goal") == 0) { VectorSubtract(self->s.origin, self->goalentity->s.origin, vec); @@ -411,10 +409,11 @@ use_scanner(edict_t *self) self->goalentity->nextthink = level.time + 0.1; self->goalentity->think = G_FreeEdict; self->goalentity = self->enemy = NULL; - self->monsterinfo.currentmove = &fixbot_move_stand; - } - return; + self->monsterinfo.currentmove = &fixbot_move_stand; + + return; + } } VectorSubtract(self->s.origin, self->s.old_origin, vec);