WC: Fix mapgen always spwaning 3 bonus points in first scenario

This commit is contained in:
gfgtdf 2023-12-30 21:35:27 +01:00 committed by GitHub
parent 963029dd7c
commit bca7a60852
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -384,8 +384,7 @@ end
function world_conquest_tek_bonus_points(theme)
local res = {}
local scenario_num = wml.variables.wc2_scenario or 1
-- wc2_player_count is not available for the first scenario, place bonus points for 3 players
local player_num = wml.variables.wc2_player_count or 3
local player_num = _G.scenario_data.nhumanplayers
oceanic = get_oceanic()
f_wct_bonus_location_filter = wesnoth.map.filter(get_f_wct_bonus_location_filter(map), { oceanic = oceanic })
local possible_locs = map:find(f_wct_bonus_location_filter)