[Commits] [wesnoth/wesnoth] 162773: bug #22936: in mp don't retain local carryover whe...

GitHub noreply at github.com
Wed Mar 4 20:37:58 UTC 2015


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 1627737166e0b52258d7110befab4ad4134de4f2
      https://github.com/wesnoth/wesnoth/commit/1627737166e0b52258d7110befab4ad4134de4f2
  Author: Chris Beck <render787 at gmail.com>
  Date:   2015-03-04 (Wed, 04 Mar 2015)

  Changed paths:
    M src/playcampaign.cpp

  Log Message:
  -----------
  bug #22936: in mp don't retain local carryover when loading scenario

In 1.12, clients separate carryover information from scenario
information when they are proceeding in a campaign.

Since 1.11.1, a bug was introduced (apparently this commit: d7a35f90)
wherein the clients and host `retain` carryover information in
a separate object from the scenario config, and merge it into
whatever level they recieve from the server. In an mp game, this
means that carryover is applied twice, once by the host when he
uploads the new level, and once again by each of the clients
individually.

Clients in general should not be performing private tweaks to
scenario data, it's better if the host does as much as possible and
the server the rest. In this case, "client-side" carryover update is
wrong because it is not performed by the observers, who only have
the information that was sent to the server.

In this commit we remove the code that causes the non-host clients
to make local copies of this info, and check that the server also
discards its local info after it has uploaded the scenario to the
server.

This commit was tested both on LoW and on a custom test campaign,
see bug tracker for details.





More information about the Commits mailing list