Edit: Actually I didn't. I think the problem is that a mouse move can be interpreted both ways (origin-dest or dest-origin) in the mouse interface, because of how pawn moves can be entered. So it thinks a swapper piece moving onto a friendly pawn, and the pawn reappearing swapped, was a pawn move the other way around. But somehow my code for the swap gets correctly run, but there seems to be some kind of post-autocorrect on the written move that even overwrites my 'rewritemove' code.
Edit 2: Actually it's better now with the 'rewritemove' code running. Sometimes the notation turns out correct. And anyway, maybe the two things are equivalent, so the game record isn't really corrupted, you could say.
Edit 3: It works with moves where the dest coord is more up-right than the origin coord. Probably because of some internal ordering of the mouse entered coords or something.
Edit 4: So in the mouse interface, origin-dest and dest-origin are really the same thing. And perhaps the Post-Move code even gets run twice to determine this (which it was)? And you're supposed to use the 'swap' command when you want a swap effect. But in my game, there might be some situations where origin-dest and dest-origin doesn't mean quite the same thing. So is there a way to turn off the dest-origin way of entering mouse moves?
Edit 5: I found a way around it in my code. And I don't think there are any ambiguous situations in my game where origin-dest and dest-origin mean different things (friendly swaps give the same result independent of direction). So I'm happy now. :)
Thanks! I think I fixed it now.
Edit: Actually I didn't. I think the problem is that a mouse move can be interpreted both ways (origin-dest or dest-origin) in the mouse interface, because of how pawn moves can be entered. So it thinks a swapper piece moving onto a friendly pawn, and the pawn reappearing swapped, was a pawn move the other way around. But somehow my code for the swap gets correctly run, but there seems to be some kind of post-autocorrect on the written move that even overwrites my 'rewritemove' code.
Edit 2: Actually it's better now with the 'rewritemove' code running. Sometimes the notation turns out correct. And anyway, maybe the two things are equivalent, so the game record isn't really corrupted, you could say.
Edit 3: It works with moves where the dest coord is more up-right than the origin coord. Probably because of some internal ordering of the mouse entered coords or something.
Edit 4: So in the mouse interface, origin-dest and dest-origin are really the same thing. And perhaps the Post-Move code even gets run twice to determine this (which it was)? And you're supposed to use the 'swap' command when you want a swap effect. But in my game, there might be some situations where origin-dest and dest-origin doesn't mean quite the same thing. So is there a way to turn off the dest-origin way of entering mouse moves?
Edit 5: I found a way around it in my code. And I don't think there are any ambiguous situations in my game where origin-dest and dest-origin mean different things (friendly swaps give the same result independent of direction). So I'm happy now. :)