URL:
  <http://gna.org/bugs/?12467>

                 Summary: Clients disagree on remaining movement points
                 Project: Battle for Wesnoth
            Submitted by: zookeeper
            Submitted on: Sunday 19/10/08 at 13:11
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.5.5+svn
        Operating System: win xp

    _______________________________________________________

Details:

When a side ends its turn, the client controlling it knows the correct number
of $unit.moves left for units of that side, but other clients won't: instead,
they see that side's units' $unit.moves completely differently.

If the unit has actually spent all of its moves, the other clients see it as
having full moves left. If the unit has spent some of its moves, the other
clients see it as having one less MP left. If the unit has spent no moves,
then everyone agrees on it having full moves left.

This doesn't cause OOS in mainline, but for example in the 1.5 version of
Brotherhood of Light it does, because mana is recharged in side turn events
based on how many MPs the unit has left from the previous turn.

I'd assume the bug is caused by the game fiddling with the remaining moves so
that the player sees how far units of other sides can move on their next turn,
but this should not affect how many moves the game actually thinks a unit has,
but instead it should just be a visual effect.

An easy way to test on a 2p map using two clients across the network, and
then just moving the leaders a bit, ending turns and seeing what each client
thinks of the other side's leader's remaining moves:


    [event]
        name=side turn
        first_time_only=no

        [if]
            [variable]
                name=side_number
                equals=1
            [/variable]

            [then]
                [store_unit]
                    [filter]
                        side=2
                        canrecruit=yes
                    [/filter]

                    variable=side_2_leader
                [/store_unit]

                {DEBUG_MSG "I see side 2 leader with $side_2_leader.moves
moves left"}
            [/then]
        [/if]

        [if]
            [variable]
                name=side_number
                equals=2
            [/variable]

            [then]
                [store_unit]
                    [filter]
                        side=1
                        canrecruit=yes
                    [/filter]

                    variable=side_1_leader
                [/store_unit]

                {DEBUG_MSG "I see side 1 leader with $side_1_leader.moves
moves left"}
            [/then]
        [/if]
    [/event]





    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?12467>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to