diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index 3449d9910..b55c7fff4 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -8581,6 +8581,24 @@ void G_RefreshLights(void) #endif } +static void G_RecordOldSpritePos(void) +{ + int statNum = 0; + do + { + int spriteNum = headspritestat[statNum++]; + + while (spriteNum >= 0) + { + int const nextSprite = nextspritestat[spriteNum]; + actor[spriteNum].bpos = sprite[spriteNum].pos; + + spriteNum = nextSprite; + } + } + while (statNum < MAXSTATUS); +} + static void G_DoEventGame(int const nEventID) { if (VM_HaveEvent(nEventID)) @@ -8621,6 +8639,8 @@ void G_MoveWorld(void) G_DoEventGame(EVENT_PREGAME); + G_RecordOldSpritePos(); + G_MoveZombieActors(); //ST 2 G_MoveWeapons(); //ST 4 G_MoveTransports(); //ST 9 diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index cecc92071..8c64ef485 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -3586,8 +3586,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura t->z += mulscale16(smoothratio,ps->pos.z-ps->opos.z) - (ps->dead_flag ? 0 : PHEIGHT) + PHEIGHT; } - else if ((pSprite->statnum == STAT_DEFAULT && pSprite->picnum != CRANEPOLE) || pSprite->statnum == STAT_PLAYER || - pSprite->statnum == STAT_STANDABLE || pSprite->statnum == STAT_PROJECTILE || pSprite->statnum == STAT_MISC || pSprite->statnum == STAT_ACTOR) + else if (pSprite->picnum != CRANEPOLE) { t->x -= mulscale16(65536-smoothratio,pSprite->x-actor[i].bpos.x); t->y -= mulscale16(65536-smoothratio,pSprite->y-actor[i].bpos.y); diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 20e614d4a..483a514b4 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -665,11 +665,9 @@ GAMEEXEC_STATIC void VM_Move(void) if (AC_MOVE_ID(vm.pData) == 0 || movflags == 0) { - if (deadflag || (vm.pActor->bpos.x != vm.pSprite->x) || (vm.pActor->bpos.y != vm.pSprite->y)) - { - vm.pActor->bpos.vec2 = vm.pSprite->pos.vec2; + if (deadflag) setsprite(vm.spriteNum, &vm.pSprite->pos); - } + return; }