mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-25 13:41:41 +00:00
Fix monsters not fighting back when attacked by parasite or fixbot.
This is another corner case. Parasites and fixbots 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.
This commit is contained in:
parent
57df678fb6
commit
119b9369e8
1 changed files with 8 additions and 2 deletions
|
@ -1060,7 +1060,10 @@ walkmonster_start_go(edict_t *self)
|
|||
}
|
||||
else
|
||||
{
|
||||
self->viewheight = 25;
|
||||
if (!self->viewheight)
|
||||
{
|
||||
self->viewheight = 25;
|
||||
}
|
||||
}
|
||||
|
||||
monster_start_go(self);
|
||||
|
@ -1101,7 +1104,10 @@ flymonster_start_go(edict_t *self)
|
|||
self->yaw_speed = 10;
|
||||
}
|
||||
|
||||
self->viewheight = 25;
|
||||
if (!self->viewheight)
|
||||
{
|
||||
self->viewheight = 25;
|
||||
}
|
||||
|
||||
monster_start_go(self);
|
||||
|
||||
|
|
Loading…
Reference in a new issue