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

Spurious "legion to tall to recruit" when angel donor legion recruits #125

Closed dripton closed 14 years ago

dripton commented 14 years ago

Sometimes a legion has an angel summoned out, but parts of the code don't seem to know that, and think the angel is 7 high.

Server side shows: Legion.py 359 ['Lion', 'Ranger', 'Angel', 'Lion', 'Ranger', 'Minotaur', 'Ranger']

But the Inspector shows the Angel is gone, and the AI's client also knows the legion is 6-high and can recruit.

dripton commented 14 years ago

Also happened to a human-controlled legion.

dripton commented 14 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