share/hedgewars/Data/Scripts/Multiplayer/WxW.lua
changeset 13685 09ea1faf97ca
parent 13643 690cc84e9fd6
child 13687 a8b2a5e7e9db
--- a/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua	Tue Aug 21 22:31:50 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua	Tue Aug 21 22:52:46 2018 +0200
@@ -882,7 +882,7 @@
 function WallHit(id, zXMin,zYMin, zWidth, zHeight)
 
 	if wTouched[id] == false then
-		tempE = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtBigExplosion, 0, false)
+		AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtBigExplosion, 0, false)
 		PlaySound(sndExplosion)
 		wallsLeft = wallsLeft - 1
 
@@ -900,7 +900,7 @@
 
 	wTouched[id] = true
 	if #wTouched > 0 then
-		tempE = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmoke, 0, false)
+		AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmoke, 0, false)
 	end
 
 end
@@ -925,10 +925,7 @@
 		local eY = zYMin + GetRandom(zHeight+10)
 
 		local tempE = AddVisualGear(eX, eY, vgtDust, 0, false)
-		if tempE ~= 0 then
-			local g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
-			SetVisualGearValues(tempE, eX, eY, g3, g4, g5, g6, g7, 1, g9, bCol )
-		end
+		SetVisualGearValues(tempE, eX, eY, nil, nil, nil, nil, nil, 1, nil, bCol )
 	end
 
 end