# HG changeset patch # User Wuzzy # Date 1518377979 -3600 # Node ID 6d328f116044a3e68c754e43f716abf59f1f153e # Parent f92e9b1df096289744d286e10e475a3ec987d0be Construction Mode: Fix cursor icon being displayed on teleport diff -r f92e9b1df096 -r 6d328f116044 share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Sun Feb 11 20:28:21 2018 +0100 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Sun Feb 11 20:39:39 2018 +0100 @@ -1215,7 +1215,7 @@ -- Handle cursor stuff. This displays a sprite under the cursor so you can see what you're going to place. function HandleCursor() - if curAmmo == amCMStructurePlacer or curAmmo == amCMObjectPlcer or curAmmo == amCMCratePlacer then + if curWep == amCMStructurePlacer or curWep == amCMObjectPlacer or curWep == amCMCratePlacer then local dFrame = 0 local dSprite local yOffset = 0 @@ -1287,6 +1287,17 @@ end end end + else + -- Cleanup vgears + if cursorIcon then + DeleteVisualGear(cursorIcon) + end + if ammoIcon then + DeleteVisualGear(ammoIcon) + end + if ammoIconBorder then + DeleteVisualGear(ammoIconBorder) + end end end