On Thu, Mar 11, 2010 at 1:34 AM, Guangcong Luo <za...@wz2100.net> wrote:

> On Wed, Mar 10, 2010 at 2:41 PM, Per Inge Mathisen
> <per.mathi...@gmail.com> wrote:
> > On Wed, Mar 10, 2010 at 9:32 PM,  <c...@users.sourceforge.net> wrote:
> >> Only let host set player position/colour
> >
> > While I see the technical issue behind this, the solution is not
> > really satisfactory. Players cannot ask the host to set their colour.
> > (Unsure about position. Might be ok that host does this.) So perhaps
> > the colour request should be based on player name, which only owner
> > can change, and remove the host's ability to change the player colour
> > - to avoid that race condition.
>
> I don't see why this should be done at all (especially with no
> discussion beforehand).
>
> The race condition of a player and a host setting a color at the same
> time isn't really a big deal - perhaps one of the choices will be
> overwritten by the other, but it's really not something worth worrying
> about.
>
> -Zarel
>

Clarification: *This patch did not change the UI in any way!* It just drops
colour/position changes that aren't sent via NET_COLOUR/POSITIONREQUEST
messages, since such changes could only be due to race conditions.
(Apparently my commit message was unclear.)


I tested with the patch, that I could change teams, colours and positions,
both as client, as host, and for the client by the host.

Players do actually request the host to change their colour. I was unsure
about teams, but when testing, it worked for teams, too.

If the colour is overwritten in the race condition (which seems that it can
be a several second window depending on network conditions), two players end
up with the same colour. If the position is overwritten, asserts, crashes
and Weird Stuff™ happens when starting the game.

(A different part of the patch also makes sure the host sends info about all
slots to newly joining players, not just about filled slots, which fixes an
inconsistency issue when someone plays a game, and joins a new game without
restarting the client. And maybe in other cases, too.)

If there's anything at all wrong with the patch, or if the commit message
wasn't descriptive enough, then sorry. (Clarification: I now know that the
commit message wasn't descriptive enough, so sorry.)

After clarifying that the patch is not a UI change, Per and Zarel now agree
that the patch was appropriate.
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to