From 244e0cfa018661a55a0c70ce617ee5531733be89 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Fri, 6 Sep 2019 06:54:47 +0200 Subject: [PATCH] Fix monsters not fighting back when attacked by a a parasite. This is another corner case. Parasites have a bbox height of 24, walkmonster_start_go() hardcodes a viewheight of 25. Therefor most traces in other functions like visible() overshoot the parasite. Fix this by not overriding the monster viewheight. Analyzed and fix suggested by @BjossiAlfreds. Closes issue yquake2/yquake2#440. --- src/g_monster.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/g_monster.c b/src/g_monster.c index a4c8282..b5dff19 100644 --- a/src/g_monster.c +++ b/src/g_monster.c @@ -1126,7 +1126,10 @@ walkmonster_start_go(edict_t *self) self->yaw_speed = 20; } - self->viewheight = 25; + if (!self->viewheight) + { + self->viewheight = 25; + } monster_start_go(self);