--- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua Fri Jul 06 17:16:01 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua Sat Jul 07 18:37:21 2018 +0200
@@ -2183,7 +2183,7 @@
end
-- if player is hit by circle bazooka
- elseif (GetGearType(gear) == gtShell) then
+ elseif (GetGearType(gear) == gtShell) and (CurrentHedgehog ~= nil) then
dist = GetDistFromGearToGear(gear, CurrentHedgehog)
@@ -2223,6 +2223,9 @@
-- collision detection for player entering a circle
function CheckDistances()
+ if not CurrentHedgehog then
+ return
+ end
--nw WriteLnToConsole("Start of CheckDistances()")
for i = 0,(vCCount-1) do