share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua
changeset 14811 d65e25e211d4
parent 14578 50f511588635
child 14823 358d81e29a88
--- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Fri Apr 19 04:48:30 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua	Fri Apr 19 15:54:44 2019 +0200
@@ -1571,13 +1571,14 @@
 ------------------------------------------------------------
 ------------------------------------------------------------
 
-function DoHorribleThings(cUID)
+function HandleRadarBlip(cUID)
 
 	-- work out the distance to the target
 	local g1X, g1Y = GetGearPosition(CurrentHedgehog)
 	local g2X, g2Y = SI.vCircX[cUID], SI.vCircY[cUID]
 	local q = g1X - g2X
 	local w = g1Y - g2Y
+	-- Floating point operations are safe, it's only for visuals
 	local r = math.sqrt( (q*q) + (w*w) )	--alternate
 
 	local opp = w
@@ -2253,7 +2254,7 @@
 			SI.vCircY[i] = SI.vCircY[i] + SI.vCircDY[i]
 
 			if (CurrentHedgehog ~= nil) and (SI.rAlpha ~= 255) then
-				DoHorribleThings(i)
+				HandleRadarBlip(i)
 			end
 
 		end