share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua
changeset 12975 6d328f116044
parent 12974 f92e9b1df096
child 13019 880662cf41ee
equal deleted inserted replaced
12974:f92e9b1df096 12975:6d328f116044
  1213 local ammoIcon = nil
  1213 local ammoIcon = nil
  1214 local ammoIconBorder = nil
  1214 local ammoIconBorder = nil
  1215 
  1215 
  1216 -- Handle cursor stuff. This displays a sprite under the cursor so you can see what you're going to place.
  1216 -- Handle cursor stuff. This displays a sprite under the cursor so you can see what you're going to place.
  1217 function HandleCursor()
  1217 function HandleCursor()
  1218 	if curAmmo == amCMStructurePlacer or curAmmo == amCMObjectPlcer or curAmmo == amCMCratePlacer then
  1218 	if curWep == amCMStructurePlacer or curWep == amCMObjectPlacer or curWep == amCMCratePlacer then
  1219 		local dFrame = 0
  1219 		local dFrame = 0
  1220 		local dSprite
  1220 		local dSprite
  1221 		local yOffset = 0
  1221 		local yOffset = 0
  1222 		if (cat[cIndex] == "Structure Placement Mode") then
  1222 		if (cat[cIndex] == "Structure Placement Mode") then
  1223 			dSprite = sprTarget
  1223 			dSprite = sprTarget
  1284 				end
  1284 				end
  1285 				if ammoIconBorder then
  1285 				if ammoIconBorder then
  1286 					DeleteVisualGear(ammoIconBorder)
  1286 					DeleteVisualGear(ammoIconBorder)
  1287 				end
  1287 				end
  1288 			end
  1288 			end
       
  1289 		end
       
  1290 	else
       
  1291 		-- Cleanup vgears
       
  1292 		if cursorIcon then
       
  1293 			DeleteVisualGear(cursorIcon)
       
  1294 		end
       
  1295 		if ammoIcon then
       
  1296 			DeleteVisualGear(ammoIcon)
       
  1297 		end
       
  1298 		if ammoIconBorder then
       
  1299 			DeleteVisualGear(ammoIconBorder)
  1289 		end
  1300 		end
  1290 	end
  1301 	end
  1291 end
  1302 end
  1292 
  1303 
  1293 function onVisualGearDelete(vg)
  1304 function onVisualGearDelete(vg)