[Commits] [wesnoth/wesnoth] 537756: fix bug 21723

GitHub noreply at github.com
Mon Jul 7 17:28:15 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 53775613f19770c6e19818fdbc5305c4c9124be0
      https://github.com/wesnoth/wesnoth/commit/53775613f19770c6e19818fdbc5305c4c9124be0
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-07-07 (Mon, 07 Jul 2014)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  fix bug 21723

https://gna.org/bugs/index.php?21723

The problem appears to be that when checking the team associated
to an item, we match it against the playing team rather than the
viewing team. This has the consequence that when it is not your
turn, you can see items that should only be visible to the
(opposing) side that is currently playing.

Tested that the bug is fixed using the following test scenario,
placed in data/multiplayer/scenarios:

    [multiplayer]
  name = "Unit Test item_visibility"
  map_data = "{test/maps/move_skip_sighted.map}"
  turns = 3
  id = item_visibility
  random_start_time = no
   {DAWN}
   [side]
      side=1
      controller=human
      name = "Alice"
      type = Elvish Archer
      id=alice
      fog=yes
      team_name=West
      share_view=no
  [/side]
  [side]
      side=2
      controller=human
      name = "Bob"
      type = Orcish Grunt
      id=bob
      fog=yes
      team_name=East
      share_view=no
  [/side]
  [side]
      side=3
      controller=human
      name = "Dave"
      type = Dwarvish Fighter
      id=dave
      fog=yes
      team_name=East
      share_view=no
  [/side]
   [event]
      name = prestart
      [item]
		x=2
		y=3
		image=scenery/rune1.png
		team_name=West
      [/item]
      [item]
		x=2
		y=5
		image=scenery/rune1.png
		team_name=East
      [/item]
       [label]
          x=3
          y=3
          text = "West team"
          team_name=West
      [/label]
       [label]
          x=3
          y=5
          text = "East team"
          team_name=East
      [/label]
  [/event]

    [/multiplayer]


  Commit: 4b1fe60eb75be4987a4abb0158d10193b688063d
      https://github.com/wesnoth/wesnoth/commit/4b1fe60eb75be4987a4abb0158d10193b688063d
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-07-07 (Mon, 07 Jul 2014)

  Changed paths:
    M src/display.cpp

  Log Message:
  -----------
  Merge branch 'fixbug21723'


  Commit: 91d14b48dcd85b3b94271146989af36386de88c6
      https://github.com/wesnoth/wesnoth/commit/91d14b48dcd85b3b94271146989af36386de88c6
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-07-07 (Mon, 07 Jul 2014)

  Changed paths:
    M changelog

  Log Message:
  -----------
  update changelog


Compare: https://github.com/wesnoth/wesnoth/compare/d56847cacdc5...91d14b48dcd8


More information about the Commits mailing list