dripton / Slugathon

Clone of the old Avalon Hill fantasy wargame Titan, using Python / PyGTK / Twisted
https://github.com/dripton/Slugathon/wiki
8 stars 2 forks source link

Player score on StatusScreen is sometimes out of date #116

Closed dripton closed 13 years ago

dripton commented 13 years ago

Sometimes the score on the StatusScreen doesn't get updated. I think it may have broken in [18ca698dafee4495d22a76ab4108c8f89a3bb41f] when I removed the RemoveLegion action.

dripton commented 13 years ago

Update player scores more often. Closed by 045f512c01d17a67fdae57b9bec48af9f1db0124

Now that we call Legion.die in Game._end_battle2, we need to update scores after every Action that can lead to _end_battle2

dripton commented 13 years ago

This happened again today.

dripton commented 13 years ago

I saw actual client and server scores out of sync in the logs today, not just in the StatusScreen.

dripton commented 13 years ago

Remove a couple of reset_angels_pending calls.

There was a race where the reset_angels_pending would happen on the client side before the Acquire action did, and then Legion.acquire call would succeed on the server side but fail on the client side, leading to out-of-sync legion contents and all kinds of problems.

Closed by 68580131438643c0e60aaaf785a1e69b080a4609 Closed by 68580131438643c0e60aaaf785a1e69b080a4609 Closed by 68580131438643c0e60aaaf785a1e69b080a4609