Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,378
The game also failed one time when I tried to shift-move some goods from the Silk Road to my cart. I was trying to buy 25 weapons. [/COLOR]
First of all I see no fix/hack/workaround for this in git, yet it looks like the fix is in the DLL (which I didn't test). I would really like to see that workaround to get into what goes wrong.Also, it will prevent you from shift clicking while in trade screens as this causes a crash.
I am not sure even how to correct that issue as the crash happens outside of our source code. It crashes because the Unit's travel state is Not UNIT_TRAVEL_STATE_IN_EUROPE. I can create a Hack where I temporary change the units travel state to IN_EUROPE and then change it back right after they load the units. Not sure if there is a better solution or not.
From what I gather about the bug:
-Shift buy is hardcoded to work on units in Europe only
-Silk road is not Europe
Sounds like a design flaw, either in M:C or in the exe (the non-modable part of vanilla). Obviously this can be fixed without hacking, but the question is how? If trading in Europe is as hardcoded as you say (that would surprise me), then we can decide not to trade in Europe at all and make our own trade function where we can control what happen. It's not like it's a really complex task. Besides the issue only appear when using shift, right?
I wonder if "the crash happens outside of our source code" mean it happens in the part of the exe, which handles python code, meaning the cause of the crash is not in the DLL, but in python. I hate python when it comes to this because I haven't figured out how to debug it or if it is even possible to debug. I made some "print to log" debugging sort of thing, but that's very far from a proper debugger.