[Commits] [wesnoth/wesnoth] aa8319: pre-empty a division by zero

GitHub noreply at github.com
Tue May 20 05:19:58 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: aa83190e07e50679db5cd92bde6e6b831988eecc
      https://github.com/wesnoth/wesnoth/commit/aa83190e07e50679db5cd92bde6e6b831988eecc
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M src/editor/map/map_fragment.cpp

  Log Message:
  -----------
  pre-empty a division by zero

(whether or not it's actually possible based on other
considerations, this is a good idea)


  Commit: 1bd43bb6a99803f77020aa02eed51b067077cea7
      https://github.com/wesnoth/wesnoth/commit/1bd43bb6a99803f77020aa02eed51b067077cea7
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M src/play_controller.cpp

  Log Message:
  -----------
  refactor is_observer out of check_victory

This is a minor change to victory_when_enemies_defeated condition.

Old logic: If there are no not defeated sides which are enemies
of eachother (i.e. there is still a battle going on),
BUT victory_when_enemies_defeated = false, and either we found
a not defeated local human player, or we are a multiplayer observer
(there are no locally controlled sides), then don't end the level.

New logic: If there are no not defeated sides which are enemies,
BUT victory when enemies defeated = false, and EITHER we found a
not defeated local human player, OR there is a not defeated remote
human player AND no local human side assigned at all,
then don't end the level.

I think this more precisely the behavior we want. is_observer
doesn't belong in this function, and with the introduction of
defeat_condition, UMC will pretty much always be able to get the
behavior they want, so I'm much more comfortable to introduce this
change now than I would be otherwise.


  Commit: c211bc4b7eaf00a3f8721e1c6e81a7ea6e4af6b3
      https://github.com/wesnoth/wesnoth/commit/c211bc4b7eaf00a3f8721e1c6e81a7ea6e4af6b3
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-05-20 (Tue, 20 May 2014)

  Changed paths:
    M src/team.cpp

  Log Message:
  -----------
  Merge branch 'master' of git://github.com/wesnoth/wesnoth


Compare: https://github.com/wesnoth/wesnoth/compare/8dbeefef9a7e...c211bc4b7eaf


More information about the Commits mailing list