forgot this one.
authornemo
Tue, 02 Dec 2014 16:45:26 -0500
changeset 10607 532d43f3d6f9
parent 10605 df7a73db2c43
child 10609 15f2908113a1
forgot this one.
share/hedgewars/Data/Scripts/Multiplayer/Tunnels.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Tunnels.lua	Tue Dec 02 20:20:04 2014 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Tunnels.lua	Tue Dec 02 16:45:26 2014 -0500
@@ -1,26 +1,4 @@
- PointsBuffer = ''  -- A string to accumulate points in
- function AddPoint(x, y, width, erase)
-     PointsBuffer = PointsBuffer .. string.char(band(x,0xff00) / 256 , band(x,0xff) , band(y,0xff00) / 256 , band(y,0xff))
-     if width then
-         width = bor(width,0x80)
-         if erase then
-             width = bor(width,0x40)
-         end
-         PointsBuffer = PointsBuffer .. string.char(width)
-     else
-         PointsBuffer = PointsBuffer .. string.char(0)
-     end
-     if #PointsBuffer > 245 then
-         ParseCommand('draw '..PointsBuffer)
-         PointsBuffer = ''
-     end
- end
- function FlushPoints()
-     if #PointsBuffer > 0 then
-         ParseCommand('draw '..PointsBuffer)
-         PointsBuffer = ''
-     end
- end
+HedgewarsScriptLoad("/Scripts/Draw.lua")
 
 function onPreviewInit()
 onGameInit()