ACF, mission 3: Fix Lua error spam when Dense Cloud dies in the pit sequence
authorWuzzy <almikes@aol.com>
Fri, 28 Apr 2017 02:45:19 +0200
changeset 12372 35e76306b016
parent 12371 2b1dd699b371
child 12373 b43c00e36369
ACF, mission 3: Fix Lua error spam when Dense Cloud dies in the pit sequence
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Fri Apr 28 02:18:21 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Fri Apr 28 02:45:19 2017 +0200
@@ -770,7 +770,11 @@
 end
 
 function CheckDensePit()
-  return GetY(dense) < 1250 and StoppedGear(dense)
+  if GetHealth(dense) ~= nil then
+    return GetY(dense) < 1250 and StoppedGear(dense)
+  else
+    return false
+  end
 end
 
 function DoDensePit()