mirror of
https://github.com/yquake2/xatrix.git
synced 2024-11-10 14:52:06 +00:00
Fix berserker fidget animation aborting attack.
M_MoveFrame() calls first the AI functions that decide if a monster should attack or not. After that the monsters think function is called which walks through berserk_frames_stand[]. Even if the AI function found an enemy and decided to attack, the monster is still standing for this frame and berserker_fidget() is called. It may override the earlier earlier decision, aborting the attack. Even worse this may let the berserker stuck, because AI_STAND_GROUND may be cleared which prevents further attacks. This bug was present in the original code, so this is small gameplay change. It's likely also present in both addons. Reported and analyzed by @BjossiAlfreds in issue #433. He also suggested the fix.
This commit is contained in:
parent
31d46e672d
commit
f83ea253c8
1 changed files with 5 additions and 0 deletions
|
@ -103,6 +103,11 @@ berserk_fidget(edict_t *self)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self->enemy)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (self->monsterinfo.aiflags & AI_STAND_GROUND)
|
if (self->monsterinfo.aiflags & AI_STAND_GROUND)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue