# HG changeset patch # User mikade # Date 1295898775 18000 # Node ID 4a99a45ea88671b2c45ac4d22e9c9abfd61bc3eb # Parent c02406028e02cba50996613d6723399d4e69777a bugfix for flag spawn, teleporter + rope diff -r c02406028e02 -r 4a99a45ea886 share/hedgewars/Data/Maps/CTF_Blizzard/map.lua --- 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