Duke3D: Stopped 3D model animations restart despite mdflags being set to 2
So this is a very strange problem and it concerns the animation of 3D Models. I'll let the video demonstrate:
https://www.youtube.com/watch?v=xrNu0opp0n8
In this video, you can see 4 instances of a bullet casing tile, which has been defined as a 3D model with a spinning animation. Initially, this animation is stopped through the use of the following CON code:
define CASING 2534
move STOP
useractor notenemy CASING 0
ifmove STOP
nullop
else
{
sizeat 32 32
setactor[THISACTOR].mdflags 2
move STOP
}
enda
If my assessment is correct, this sets the mdflags = 2
exactly a single time on spawning, and should hence disable the animation. However, as soon as the player picks up the pistol sprites on the ground, the animation of certain sprites restarts. Even more curiously, by adding additional sprites onto the map, e.g. through firing a weapon such as the pistol, the RPG or throwing a pipebomb, the animation can be interrupted again. Note that this does not depend on the type of sprite that is removed or added to the map. Also note that the above is the only piece of custom CON code that is running, so the problem cannot stem from overwriting the flag in another script.
This problem started somewhere between r5070 (74f180de) and r5075 (ad8fcba6) (inclusive), I couldn't bisect any further due to compilation problems.
In the attachment you find the files required to reproduce this bug. Simply put the contents of the folder into the eduke32 base directory and run the batch file: mdflag2bug.zip