# HG changeset patch # User Wuzzy # Date 1560525665 -7200 # Node ID 651c1737be2a407249849acb0adf152f089993d0 # Parent 309aa93df1109089e9a32a6efaa71f6d6c3bd48b WxW, Racer: Make bots skip/auto-confirm setup phase diff -r 309aa93df110 -r 651c1737be2a ChangeLog.txt --- a/ChangeLog.txt Fri Jun 14 17:05:00 2019 +0200 +++ b/ChangeLog.txt Fri Jun 14 17:21:05 2019 +0200 @@ -52,6 +52,8 @@ * HedgeEditor: Fix major FPS drop when there are a lot of objects * Control: Fix score failure after using extra time * Frenzy: Fix incorrect ammo slot numbers in ammo menu + * Continental supplies: Computer teams now select random continent + * WxW, Racer: Computer teams no longer block setup phase A Classic Fairytale: + Backstab: Disable utilities before traitor has been dealt with diff -r 309aa93df110 -r 651c1737be2a share/hedgewars/Data/Scripts/Multiplayer/Racer.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Fri Jun 14 17:05:00 2019 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Fri Jun 14 17:21:05 2019 +0200 @@ -866,6 +866,10 @@ loc("Waypoint placement phase"), infoString, -amAirAttack, 4000) AddAmmo(CurrentHedgehog, amAirAttack, 4000) SetWeapon(amAirAttack) + -- Bots skip waypoint placement + if GetHogLevel(CurrentHedgehog) ~= 0 then + SkipTurn() + end end end diff -r 309aa93df110 -r 651c1737be2a share/hedgewars/Data/Scripts/Multiplayer/WxW.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua Fri Jun 14 17:05:00 2019 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua Fri Jun 14 17:21:05 2019 +0200 @@ -977,7 +977,7 @@ AddCaption(loc("Please place your hedgehog first!"), msgColorWarn, capgrpMessage2) end -function onLJump() +function AcceptConfiguration() if roundN == 1 then PlaySound(sndPlaced) SetInputMask(0xFFFFFFFF) @@ -1001,6 +1001,12 @@ end PlaySound(sndYesSir, CurrentHedgehog) FinalizeMenu() + end +end + +function onLJump() + if roundN == 1 then + AcceptConfiguration() elseif roundN == 2 then PlaceWarn() elseif roundN == 100 then @@ -1363,6 +1369,9 @@ UpdateMenu() AddCaption(string.format(loc("%s may choose the rules."), GetHogTeamName(CurrentHedgehog)), msgColorTech, capgrpGameState) HandleStartingStage() + if GetHogLevel(CurrentHedgehog) ~= 0 then + AcceptConfiguration() + end end end