Merge pull request #44 from BjossiAlfreds/monsterframes

Monster frame handling improvements
This commit is contained in:
Yamagi 2020-01-12 11:34:49 +01:00 committed by GitHub
commit 42213ec796
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -685,11 +685,19 @@ M_MoveFrame(edict_t *self)
(self->monsterinfo.nextframe >= move->firstframe) &&
(self->monsterinfo.nextframe <= move->lastframe))
{
self->s.frame = self->monsterinfo.nextframe;
if (self->s.frame != self->monsterinfo.nextframe)
{
self->s.frame = self->monsterinfo.nextframe;
self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
}
self->monsterinfo.nextframe = 0;
}
else
{
/* prevent nextframe from leaking into a future move */
self->monsterinfo.nextframe = 0;
if (self->s.frame == move->lastframe)
{
if (move->endfunc)