check waterline
authormikade
Fri, 16 Sep 2011 01:45:41 +0200
changeset 5923 ae8cfd039ab2
parent 5922 7e7774e7be8c
child 5924 82fc26c53d2a
check waterline
share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Fri Sep 16 01:12:57 2011 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Fri Sep 16 01:45:41 2011 +0200
@@ -496,6 +496,9 @@
 		if TestRectForObstacle(x-20, y-20, x+20, y+20, true) then
 			AddCaption(loc("Please place the way-point in the open, within the map boundaries."))
 			PlaySound(sndDenied)
+		elseif (y > WaterLine-50) then
+			AddCaption(loc("Please place the way-point further from the waterline."))
+			PlaySound(sndDenied)
 		else
 			PlaceWayPoint(x, y)
 			if wpCount == wpLimit then