From reading that, it seems like you've fixed the right-click bug and not "my" steel-digging glitch. This steel glitch doesn't require the right mouse button to be used at all (it just depends on the cursor position).
No, it is the fix for the steel-digging glitch. I guess it's a little unclear, and it's hard to explain without pointing to the actual changes in source code. Let me try again. Also, note that I'm trying to fix it such that existing replays already recorded containing usages of the steel-digging glitch will play back correctly w/o needing to be re-recorded.
Now, the steel-digging glitch requires a prioritized and a non-priortized lemming being considered in the digger skill-assignment code. However, the replay mechanism only records the lemming the skill is assigned to. If there's a choice of 2 lemmings being considered in the skill assignment, the replay does not record the information regarding which lemming is the "other" lemming. Also, the replay records the mouse cursor position, but not whether the right-mouse button has been pressed.
Because of the missing information, to fix the problem means I need to recover the full prioritized/non-prioritized information from what's available in the replay records. The mouse cursor position is a big help because I can pass that in to the prioritize hit-testing code to recover which lemming (if any) is the prioritized lemming, and which is the non-prioritized lemming. At first I thought that is sufficient, but then my replay for the 1-builder Mayhem 14 solution failed to play back correctly at a move completely unrelated to the glitch. Turns out one of the recorded moves actually make use of holding down the right mouse button to select the non-prioritized lemming under the cursor. Unfortunately, this right-mouse button information is not being captured anywhere in the replay, except for the fact that the assigned lemming (which is saved in the replay) would be different from the prioritized lemming based on normal prioritization calculations.
But it gets worse. Just because the non-prioritized lemming gets selected doesn't necessarily mean the right-mouse button is down. In particular, as you've noted, the steel-digging glitch is a case where you actually cannot have the right-mouse button down, even though it's the non-prioritized lemming that gets assigned the digger.
So the only way to fix it is to basically first test to see which lemming the skill assignment would've chosen, assuming the right-mouse button isn't down. Only when that leads to the "wrong" lemming being chosen (as we can check against the lemming in the replay records) do we redo the skill assignment assuming right-mouse button is down.
The skill assignment code originally does not have this separation of "just test out which lemming gets chosen" and "do the actual skill assignment on the lemming chosen--decrease number of skills, change the status of the lemming, etc.". So to implement my fix, I have to change the code for all 8 types of skill assignment, to support a usage specific for replays, where we merely wants to know which lemming gets chosen, without actually going through with the skill assignment. Now, I'm fairly confident that I've made the changes correctly, but since the code for all skill assignments are affected, it seems prudent to have more thorough testing of skill assignment in all possible scenarios, whether in replays or not.
Or have you done both at once?
I can't fix the right-click glitch until I fully understand what's going on, which I don't at the moment. I'll first need to find the relevant code in the original game responsible for the behavior, in order to make sure that I can correctly emulate the behavior in all cases in Lemmix.
It's likely that to fix the right-click glitch, I'd need to expand the replay format to record more information related to the mouse. Fortunately since there are currently no replays that make use of the glitch (since the glitch doesn't work in Lemmix outside of replays to begin with), it would be acceptable to require changing the replay format to support it in replays. Of course, once you do that, you need to have the code being able to handle both the old and new replay formats, which can lead to a lot of messy code.
If you and Eric are in the mood for fixing Lemmix ri fght now, I have some ideas for changes that would really help with the least time challenge. Pausing for time and the nuke glitch are the two main ones, but there are a few others as well.
Thanks. I'll take a look at that thread and see. The nuke glitch in particular should be pretty easy to fix. Pausing for time may take some work to fix though, we'll see.