Okay, said update is done.
Now - one thing I took into account is, given how long Lemmix has been around, there are going to be
a lot of levels that have been designed tailored to this incorrect behaviour. As such, rather than outright fix the bug and leave these levels broken, I added an option in the Config screen (or in the INI file, if that's your preferred method of configuring it) to enable or disable this bug. By default, the bug is disabled for the official game players (since those levels obviously were not designed for such a bug), and enabled in Cust / Flexi (where most likely, the levels played
will expect this bug to be part of the physics); but in either case it's configurable.
I didn't bother to make a creator-side option for Flexi for this. The reason being that basically, traditional Lemmix flexi isn't exactly very widely used - as far as I'm aware only a single pack has ever been made on it, and that pack hasn't been updated to newer versions anyway. Rather, most traditional Lemmix large packs have been made by simply using LookForLVLFiles together with an official game's player, or in rare cases, compiled from source code.
That aside, I also reverted V28's changes to the replay file, since the replay database never really took off and was eventually taken down. V29 can load replays from V28, but replays it saves will be compatible with all versions (at least where the absence / presence of the trap bug doesn't break them), rather than only self-compatible like V28's were.
Downloads at all the usual places -
DropBox, or the
NeoLemmix Website (check the Lemmix section on the left).
This shouldn't matter too much for the various challenge solutions, since fixing this bug makes the game more lenient, not less. However, I guess if there's situations where a crowd of lemmings walks past a trap, and a *specific* lemming needs to survive, it could matter... but such setups would need to be very, very specific, and I find it unlikely any have happened. So we can probably assume the challenge solutions are safe.
If anyone is using the source code for anything, the following are the relevant changes from previous code:
LemGame.pas
In TLemmingGame.CheckForInteractiveObjects, the 0..127 branch of the Case statement, the following lines have been put into an IF branch which is conditional on the "Lemmix Trap Bug" option being turned on:
Inc(Inf.CurrentFrame);
if Inf.CurrentFrame >= Inf.MetaObj.AnimationFrameCount then
Inf.CurrentFrame := 0;
If compiling a player from source where you don't want the bug to be present at all (rather than being an option), these lines can simply be commented out rather than put behind an If statement (and the remaining changes in other files can be ignored). I'm really wondering why EricLang put them there in the first place, perhaps it was related to an earlier method of implementing the traps and he forgot to fix it later?
As for reverting the replays, I simply used the V27 code, and in the part that checks the header version, I made it recognize the V28 header version too.
GameControl.pas
The placeholder mo8 option was changed to moLemmixTrapBug (to be more descriptive), and the appropriate property and setter/getter functions added.
GameConfig.pas
A few changes to the building and function of the menu to add the Lemmix Trap Bug option.