mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-13 00:24:44 +00:00
Merge pull request #501 from BjossiAlfreds/monsterframes
Monster frame handling improvements
This commit is contained in:
commit
9f00655e8e
1 changed files with 9 additions and 1 deletions
|
@ -522,11 +522,19 @@ M_MoveFrame(edict_t *self)
|
||||||
(self->monsterinfo.nextframe >= move->firstframe) &&
|
(self->monsterinfo.nextframe >= move->firstframe) &&
|
||||||
(self->monsterinfo.nextframe <= move->lastframe))
|
(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;
|
self->monsterinfo.nextframe = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* prevent nextframe from leaking into a future move */
|
||||||
|
self->monsterinfo.nextframe = 0;
|
||||||
|
|
||||||
if (self->s.frame == move->lastframe)
|
if (self->s.frame == move->lastframe)
|
||||||
{
|
{
|
||||||
if (move->endfunc)
|
if (move->endfunc)
|
||||||
|
|
Loading…
Reference in a new issue