share/hedgewars/Data/Maps/CTF_Blizzard/map.lua
changeset 4871 4a99a45ea886
parent 4843 673f74c89687
child 4953 ebd3dae634ca
--- a/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua	Sat Jan 22 22:43:54 2011 +0100
+++ b/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua	Mon Jan 24 14:52:55 2011 -0500
@@ -68,6 +68,15 @@
 -- removed teleport from starting weapons
 -- increased captures to 3
 
+-----------
+-- 0.7
+------------
+
+-- hopefully fixed a bug with the teleporters
+
+-- added a fix for crate possibly getting imbedded in land when it was near
+-- the water line
+
 loadfile(GetDataPath() .. "Scripts/Locale.lua")()
 
 ---------------------------------------------------------------
@@ -83,6 +92,8 @@
 						-- on ROUNDS instead?
 local effectTimer = 0
 
+local ropeGear = nil
+
 --------------------------
 -- hog and team tracking variales
 --------------------------
@@ -349,8 +360,13 @@
 	end
 
 	if fThief[wtf] ~= nil then
-		--SetEffect(fThief[wtf], hePoisoned, false)
-		fGear[wtf] = SpawnAmmoCrate(fThiefX[wtf],fThiefY[wtf]-50,amSkip)
+		
+		if fThiefY[wtf] > 2040 then
+			fGear[wtf] = SpawnAmmoCrate(fThiefX[wtf],(fThiefY[wtf]+10),amSkip)
+		else
+			fGear[wtf] = SpawnAmmoCrate(fThiefX[wtf],(fThiefY[wtf]-50),amSkip)
+		end
+
 		AddVisualGear(fThiefX[wtf], fThiefY[wtf], vgtBigExplosion, 0, false)
 		fThief[wtf] = nil
 	end
@@ -417,7 +433,11 @@
 
 	if teleportActive == true then
 		if actionReset == 0 then
-			SetGearMessage(CurrentHedgehog, gmAttack)
+			if ropeGear ~= nil then
+				if GetGearElasticity(ropeGear) ~= 0 then
+					SetGearMessage(CurrentHedgehog, gmAttack)
+				end
+			end
 			--AddCaption(actionReset .. ";" .. "attack")
 		elseif actionReset == 10 then
 			SetGearMessage(CurrentHedgehog, 0)
@@ -752,6 +772,10 @@
 
 	end
 
+	if GetGearType(gear) == gtRope then
+		ropeGear = gear
+	end
+
 end
 
 function onGearDelete(gear)
@@ -760,4 +784,8 @@
 		FlagDeleted(gear)
 	end
 
+	if GetGearType(gear) == gtRope then
+		ropeGear = nil
+	end
+
 end