Closed rocketinventor closed 7 years ago
Wow, nice detective work! Thanks for the fix.
So, just to clarify: did you conclude that this was the cause of some of the consistency problems? Or just that the coordinate mismatch made debugging really hard.
@rocketinventor I think there's only one place where coordinates come into the server, and one place where they come out. With this pull request, you've swapped the coordinates on the way in and on the way out. The effect of this is just to make the server play a mirror image of the game it had been playing previously, so I don't see how this would fix something like #26.
@cdmalon Yah, I kind of came to that realization :) This just makes it easier to debug. During my testing, it seemed as though a few problems went away but, it was probably just coincidental.
Partially solves #27. Coordinates were being switched when they were sent to the server, then switched again. As a result, the coordinates recorded by the client did not match those logged by the server. This issue has now been resolved.Event logging has been drastically improved as well.Both the client and the server now have an event log with the coordinates sent, and the coordinates received. For clarity, both the server and the client print out the information in the same format with clear labels explaining what is going on. Also, the client now logs errors that weren't getting logged before.
This should make solving similar issues much easier in the future.