merge
authorsheepluva
Mon, 25 May 2015 22:50:38 +0200
changeset 10962 91d256bbd840
parent 10960 4f77e60146fc (current diff)
parent 10961 b30f29396f0c (diff)
child 10963 e061da85f32d
merge
ChangeLog.txt
share/hedgewars/Data/Scripts/TechMaps.lua
--- a/ChangeLog.txt	Mon May 25 22:32:32 2015 +0200
+++ b/ChangeLog.txt	Mon May 25 22:50:38 2015 +0200
@@ -2,6 +2,7 @@
 * bugfixes
 
 0.9.21 -> 0.9.22
+ + Map previews can now take script parameters into account and preview waypoints in TechRacer
  + Added a couple new flags
  + Small improvements to the interface and in-game chat
  * Generated bridges/girders are now connected better to the land mass
--- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Mon May 25 22:32:32 2015 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Mon May 25 22:50:38 2015 +0200
@@ -62,7 +62,7 @@
 HedgewarsScriptLoad("/Scripts/OfficialChallenges.lua")
 HedgewarsScriptLoad("/Scripts/Tracker.lua")
 HedgewarsScriptLoad("/Scripts/Params.lua")
-HedgewarsScriptLoad("/Scripts/TechMapsDev.lua")
+HedgewarsScriptLoad("/Scripts/TechMaps.lua")
 
 ------------------
 -- Got Variables?
--- a/share/hedgewars/Data/Scripts/TechMaps.lua	Mon May 25 22:32:32 2015 +0200
+++ b/share/hedgewars/Data/Scripts/TechMaps.lua	Mon May 25 22:50:38 2015 +0200
@@ -26,6 +26,16 @@
 function LoadSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
 	PlaceSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
 end
+function PreviewWayPoint(x,y)
+    AddPoint(x,y,20)
+    AddPoint(x,y,19,true)
+    for i = 0,100,50 do
+        AddPoint(x-120,y+i,1,true)
+        AddPoint(x+120,y-i)
+        AddPoint(x-i,y+120,1,true)
+        AddPoint(x+i,y-120)
+    end
+end
 
 function PreviewGirder(x, y, f)
     if f == 0 then
@@ -68,6 +78,15 @@
 	if mapID == 4 then
 	---nice rope and airmines landflag testmap
     -- it'd be nice if these coordinates were stored somewhere generic so they didn't have to be edited twice. Some map array or something
+	PreviewWayPoint(337, 533)
+	PreviewWayPoint(1069, 1367)
+	PreviewWayPoint(884, 729)
+	PreviewWayPoint(1682, 464)
+	PreviewWayPoint(2773, 505)
+	PreviewWayPoint(3512, 929)
+	PreviewWayPoint(4002, 106)
+	PreviewWayPoint(3964, 1520)
+	PreviewWayPoint(2592, 1334)
 	PreviewGirder(194, 388, 7)
 	PreviewGirder(338, 334, 4)
 	PreviewGirder(484, 390, 5)