[Commits] [wesnoth/wesnoth] 6dee13: notify server of wml controller changes

GitHub noreply at github.com
Sun Nov 16 19:51:53 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 6dee1366a59f726289fcc91b968dcef0e4502db6
      https://github.com/wesnoth/wesnoth/commit/6dee1366a59f726289fcc91b968dcef0e4502db6
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-11-16 (Sun, 16 Nov 2014)

  Changed paths:
    M src/game_events/action_wml.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/server/game.cpp
    M src/server/game.hpp
    M src/server/server.cpp
    M src/team.cpp
    M src/team.hpp

  Log Message:
  -----------
  notify server of wml controller changes

Previously this scenario would have resulted in OOS, becasue of the content of the "side turn" event:

[scenario]
	id= "03_MANYSIDES_TEST"
	name= _ "MP Sides Test"
	description= _ "This secnario is for testing side numbers"
	map_data= "border_size=1
usage=map

Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg
Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg
Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg
Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg, Ch, Ch, Gg, Ch, Ch, Gg, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg
Rr^Vhc, Rr^Vhc, Rr^Vhc, 1 Kh, Ch, Gg, Gg, Gg, Ch, 2 Kh, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg
Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg, Gg, Ch, Gg, Ch, Gg, Gg, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg
Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg
Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg
Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg, Gg, Gg, Gg, Gg, Gg, Gg, Rr^Vhc, Rr^Vhc, Rr^Vhc, Gg"

	experience_modifier=20%
	turns=-1
	{DEFAULT_SCHEDULE}
	allow_new_game = yes
	[side]
		side={NUMBER}
		id= "leader{NUMBER}"
		save_id= "leader{NUMBER}"
		controller={CONTROLLER}
		team_name={TEAMNAME}
		type = "Elvish Archer"
		canrecruit="yes"
		village_gold=5
		income=10
		share_maps=yes
		share_view=yes
  shroud=yes
		gold=200
		experience=40
		recruit=Elvish Archer,Elvish Fighter,Elvish Scout,Elvish Shaman
		x,y = {X} ,{Y}
	[/side]
	{NORMALSIDE  1 "human" "good" 3  2 }
	{NORMALSIDE  2 "ai" "evil" 4  2 }
	{NORMALSIDE  3 "human" "good" 5  2 }
	{NORMALSIDE  4 "ai" "evil" 6  2 }
	{NORMALSIDE  5 "human" "good" 7  2 }
	{NORMALSIDE  6 "ai" "evil" 8  2 }
	{NORMALSIDE  7 "human" "good" 9  3 }
	{NORMALSIDE  8 "ai" "evil" 9  3 }
	{NORMALSIDE  9 "human" "good" 3  6 }
	{NORMALSIDE 10 "ai" "evil" 4  6 }
	{NORMALSIDE 11 "human" "good" 5  6 }
	{NORMALSIDE 12 "ai" "evil" 6  6 }
	{NORMALSIDE 13 "human" "good" 7  6 }
	{NORMALSIDE 14 "ai" "evil" 3  6 }
	{NORMALSIDE 15 "human" "good" 9  6 }
	{NORMALSIDE 16 "ai" "evil" 10 6 }
	[event]
		name = "side turn"
		first_time_only = no
		[lua]
		code = <<
			local helper = wesnoth.require("lua/helper.lua")
			local controller = helper.rand("human,ai,null")
			local side_num = wesnoth.current.side + 1
			if side_num > #wesnoth.get_sides({}) then side_num = 1 end
			wesnoth.sides[side_num].controller = controller
		>>
		[/lua]
	[/event]
[/scenario]


  Commit: a65752a67696290c6f8a0e96c1b38c37c71535f5
      https://github.com/wesnoth/wesnoth/commit/a65752a67696290c6f8a0e96c1b38c37c71535f5
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-11-16 (Sun, 16 Nov 2014)

  Changed paths:
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/playturn.hpp

  Log Message:
  -----------
  remove class with throwing destructor


Compare: https://github.com/wesnoth/wesnoth/compare/50d2b133ec3a...a65752a67696


More information about the Commits mailing list