--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Thu Apr 07 11:53:20 2016 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Sun Apr 10 14:00:09 2016 +0900
@@ -1,6 +1,6 @@
------------------------------------------
--- RACER 0.6
+-- RACER 0.8
-- map-independant racing script
-- by mikade
-----------------------------------------
@@ -73,6 +73,11 @@
-- switch to first available weapon if starting race with no weapon selected
+-------
+-- 0.8
+-------
+-- allow different boost directions
+
-----------------------------
-- SCRIPT BEGINS
-----------------------------
@@ -151,6 +156,10 @@
local lastRound
local RoundHasChanged
+local boostX = 0
+local boostY = 0
+local boostValue = 1
+
-------------------
-- general methods
-------------------
@@ -224,6 +233,31 @@
-- RACER METHODS
-----------------
+function onLeft()
+ boostX = boostX +boostValue
+end
+function onLeftUp()
+ boostX = boostX -boostValue
+end
+function onRight()
+ boostX = boostX -boostValue
+end
+function onRightUp()
+ boostX = boostX +boostValue
+end
+function onUp()
+ boostY = boostY +boostValue
+end
+function onUpUp()
+ boostY = boostY -boostValue
+end
+function onDown()
+ boostY = boostY -boostValue
+end
+function onDownUp()
+ boostY = boostY +boostValue
+end
+
function CheckWaypoints()
trackFinished = true