This patch removes a rather retarded line of legacy Duke3D code that breaks interpolation for CON actors:
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; // <-- This line is dumb setsprite(vm.spriteNum, &vm.pSprite->pos); } return; }
The problem here, is that the old position is overwritten by the new position every frame, before it even gets a chance to be processed by the interpolation code.
If you wondered why CON actors are jittery, but everything else is not, this is why. This patch makes CON actors behave like everything else.
I want modders to test out their own mods with this patch, and see how things behave.
If you have any instantly-teleporting actors in your mod that are being "tweened" from their old position to their new one, and you don't wish for this to happen, set htbpos(x/y/z) to the x/y/z coords of the actor after moving, like so:
// Do this after changing x, y, or z, or calling a movesprite command. setactor[THISACTOR].htbposx sprite[].x setactor[THISACTOR].htbposy sprite[].y setactor[THISACTOR].htbposz sprite[].z
Shorter version in spoiler:
This is something hard-coded actors in Duke3D do when they need to teleport from one location to another, and is good practice to do anyway, with this patch or not.
Link to the patch itself: http://shadowmaveric...lation_Fix.diff
Here's a link to an eduke32.exe build with this patch: http://shadowmaveric...reX/eduke32.exe
I just want to get peoples' opinions on this patch, and whether or not this fix needs to be opt-in or not (I'm leaning towards no, because it's how all moving non-CON actors behave already).
Also, give it a try in Ion Fury, and marvel at how much smoother things are.