# HG changeset patch # User Wuzzy # Date 1460548853 -7200 # Node ID ace20b1d8d53a2f329c7d1836a5a6c3eeed1364e # Parent 7123bfc9643c1e0dbf48f7d23862fc36f70fcef7 Add “rounds” script parameter for Racer diff -r 7123bfc9643c -r ace20b1d8d53 share/hedgewars/Data/Scripts/Multiplayer/Racer.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Wed Apr 13 14:00:03 2016 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Wed Apr 13 14:00:53 2016 +0200 @@ -169,6 +169,12 @@ if params["teamrope"] ~= nil then TeamRope = true end + if params["rounds"] ~= nil then + roundLimit = math.max(1, math.floor(tonumber(params["rounds"]))) + if type(roundLimit) ~= "number" then + roundLimit = 3 + end + end end function RebuildTeamInfo()