[Commits] [wesnoth/wesnoth] 136c74: fix bug 21723

GitHub noreply at github.com
Mon Jul 7 17:26:38 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 136c7475f302e296aca5f8374a8eb5ef0f656a87
      https://github.com/wesnoth/wesnoth/commit/136c7475f302e296aca5f8374a8eb5ef0f656a87
  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 = "Gg, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, 1 Gg^Kov, Gg^Kov, Gg^Kov, 3 Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Kha^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Kha^Kov, Gg^Kov, Gg^Kov, 2 Gg^Kov, Gg^Kov
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Cha^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Cha^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov
Gg^Kov, Gg^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Chs^Kov, Gg^Kov, 4 Ch^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Gg^Kov
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg
Gg^Kov, Gg^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Gg
Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg^Kov, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg"
  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: 848a94aacca9bbcc9209479f59e4253be2256e37
      https://github.com/wesnoth/wesnoth/commit/848a94aacca9bbcc9209479f59e4253be2256e37
  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_1.12' into 1.12


  Commit: 526349cbec9805f6de66faf26285f7943495985e
      https://github.com/wesnoth/wesnoth/commit/526349cbec9805f6de66faf26285f7943495985e
  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/83873790314e...526349cbec98


More information about the Commits mailing list