# HG changeset patch # User Wuzzy # Date 1558442290 -7200 # Node ID fa597f6e301d8d21dbb28f074595a17de75c68aa # Parent 51fbc0034c6f3bae7623c0845080d65d9fa60254 ACF2: Fix Lua error when hog dies during cyborg choice phase diff -r 51fbc0034c6f -r fa597f6e301d ChangeLog.txt --- a/ChangeLog.txt Tue May 21 12:58:28 2019 +0200 +++ b/ChangeLog.txt Tue May 21 14:38:10 2019 +0200 @@ -51,6 +51,7 @@ + Backstab: Disable utilities before traitor has been dealt with * Backstab: Prevent attacking the cannibals before making the choice * First blood: Fix Lua error when hitting Attack after failing the rope challenge + * The Shadow Falls: Fix Lua error when hog dies during choice phase * General: Clear hazards around cyborg when it appears in cut scenes * General: Disable Sudden Death for all missions * Various minor tweaks and bugfixes diff -r 51fbc0034c6f -r fa597f6e301d share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua Tue May 21 12:58:28 2019 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua Tue May 21 14:38:10 2019 +0200 @@ -790,7 +790,7 @@ end function CheckRefuse() - return GetX(dense) > 1400 and StoppedGear(dense) + return GetHealth(dense) and GetX(dense) > 1400 and StoppedGear(dense) end function DoRefuse() @@ -801,6 +801,9 @@ end function CheckAccept() + if not GetHealth(dense) then + return false + end if GetX(dense) < 1300 then -- When close to cyborg, wait for a short time before accepting, -- to allow player to attack with melee weapons. @@ -822,7 +825,7 @@ end function CheckConfront() - return cyborgAttacked and StoppedGear(dense) + return cyborgAttacked and GetHealth(dense) and StoppedGear(dense) end function DoConfront()