wesnoth/wesnoth — pull request #138 by cbeck88 (2014-04-05 19:59:42+00:00)
Title: Fixup side drop mechanism

*** EXPERIMENTAL! Do not merge yet. Feedback and testing appreciated.***

This branch is aimed at fixing bug 21459. https://gna.org/bugs/index.php?21459

The changes (some of which may be dropped) include:

- Maybe_do_initside checks if the side we are resetting matches the current player when considering whether to init. (This actually doesn't seem to have an effect with regards to the bug but I can't see that it's a bad idea.)

- The one which seems to fix the problem is basically that I implement my plan here from the gna discussion: "I'm not sure if it will fix the bug, but I'm going to change the system so that 1.) abandoned sides are idle rather than controlled by the host, 2.) idle sides are not initialized on the start of their turn. "

- It also fixes an oversight of mine that the idle loop needs to work differently in networked mp -- that would have caused bugs independently of 21459.