diff -r 37a781d28e43 -r 2e8213c0951f share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Tue Apr 02 01:34:13 2019 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Tue Apr 02 14:51:55 2019 +0200 @@ -106,6 +106,7 @@ local fortMode = false -- is using a fort map? local tempID_CheckProximity = nil -- temporary structure variable for CheckProximity local cGear = nil -- detects placement of girders and objects (using airattack) +local cGearPlacementDone = false local uniqueStructureID = 0 -- Counter and ID for structures. Is incremented each time a structure spawns -- Colors @@ -1385,17 +1386,19 @@ local x,y = GetGearTarget(cGear) if GetGearType(cGear) == gtAirAttack then - DeleteGear(cGear) - PlaceObject(x, y) + SetGearMessage(cGear, bor(GetGearMessage(cGear), gmDestroy)) + if not cGearPlacementDone then + PlaceObject(x, y) + cGearPlacementDone = true + end elseif GetGearType(cGear) == gtTeleport then - - CheckTeleport(cGear, x, y) - cGear = nil + CheckTeleport(cGear, x, y) + cGear = nil + cGearPlacementDone = true elseif GetGearType(cGear) == gtGirder then - currentGirderRotation = GetState(cGear) - PlaceObject(x, y) + cGearPlacementDone = true end end @@ -1877,6 +1880,7 @@ local gt = GetGearType(gear) if (gt == gtAirAttack) or (gt == gtTeleport) or (gt == gtGirder) then cGear = gear + cGearPlacementDone = false end if isATrackedGear(gear) then