Fixed crashes in mission 3 after RestoreHog
authorbelphegorr <szabibibi@gmail.com>
Sat, 25 Aug 2012 23:20:40 +0300
changeset 7514 8699d501a01e
parent 7512 cc3f036121fe
child 7516 d167af4ab5a0
Fixed crashes in mission 3 after RestoreHog
misc/quazip/libquazip.a
share/Makefile
share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua
Binary file misc/quazip/libquazip.a has changed
--- a/share/Makefile	Wed Aug 22 19:13:13 2012 +0300
+++ b/share/Makefile	Sat Aug 25 23:20:40 2012 +0300
@@ -35,6 +35,9 @@
 # The command to remove a file.
 RM = /usr/bin/cmake -E remove -f
 
+# Escaping for special characters.
+EQUALS = =
+
 # The program to use to edit the cache.
 CMAKE_EDIT_COMMAND = /usr/bin/ccmake
 
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua	Wed Aug 22 19:13:13 2012 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua	Sat Aug 25 23:20:40 2012 +0300
@@ -774,8 +774,11 @@
 end
 
 function DoDensePit()
-  AddAnim(outPitAnim)
-  AddFunction({func = AfterOutPitAnim, args = {}})
+  TurnTimeLeft = 0
+  RestoreHedge(cyborg)
+  AnimWait(cyborg, 1)
+  AddFunction({func = AddAnim, args = {outPitAnim}})
+  AddFunction({func = AddFunction, args = {{func = AfterOutPitAnim, args = {}}}})
 end
 
 function CheckPastFlower()
@@ -787,8 +790,11 @@
 end
 
 function DoPastFlower()
-  AddAnim(pastFlowerAnim)
-  AddFunction({func = AfterPastFlowerAnim, args = {}})
+  TurnTimeLeft = 0
+  RestoreHedge(cyborg)
+  AnimWait(cyborg, 1)
+  AddFunction({func = AddAnim, args = {pastFlowerAnim}})
+  AddFunction({func = AddFunction, args = {{func = AfterPastFlowerAnim, args = {}}}})
 end
 
 
@@ -831,8 +837,12 @@
 end
 
 function DoOnBridge()
-  AddAnim(midAnim)
-  AddFunction({func = AfterMidAnimAlone, args = {}})
+  TurnTimeLeft = 0
+  RestoreHedge(cyborg)
+  RestoreHedge(princess)
+  AnimWait(cyborg, 1)
+  AddFunction({func = AddAnim, args = {midAnim}})
+  AddFunction({func = AddFunction, args = {{func = AfterMidAnimAlone, args = {}}}})
 end
 
 function CheckGirderTaken()
@@ -858,8 +868,12 @@
 end
 
 function DoTookSniper()
-  AddAnim(endAnim)
-  AddFunction({func = AfterEndAnimAlone, args = {}})
+  TurnTimeLeft = 0
+  RestoreHedge(cyborg)
+  RestoreHedge(princess)
+  AnimWait(cyborg, 1)
+  AddFunction({func = AddAnim, args = {endAnim}})
+  AddFunction({func = AddFunction, args = {{func = AfterEndAnimAlone, args = {}}}})
 end
 
 function CheckTookSniper2()
@@ -867,8 +881,12 @@
 end
 
 function DoTookSniper2()
-  AddAnim(endAnim)
-  AddFunction({func = AfterEndAnimDuo, args = {}})
+  TurnTimeLeft = 0
+  RestoreHedge(cyborg)
+  RestoreHedge(princess)
+  AnimWait(cyborg, 1)
+  AddFunction({func = AddAnim, args = {endAnim}})
+  AddFunction({func = AddFunction, args = {{func = AfterEndAnimDuo, args = {}}}})
 end
 
 function CheckLost()
@@ -902,8 +920,12 @@
 end
 
 function DoFailedCourse()
-  AddAnim(failAnim)
-  AddFunction({func = AfterMidFailAnim, args = {}})
+  TurnTimeLeft = 0
+  RestoreHedge(cyborg)
+  RestoreHedge(princess)
+  AnimWait(cyborg, 1)
+  AddFunction({func = AddAnim, args = {failAnim}})
+  AddFunction({func = AddFunction, args = {{func = AfterMidFailAnim, args = {}}}})
 end
 
 --////////////////////////////Main Functions/////////////////////////
@@ -1046,6 +1068,7 @@
     SetAnimSkip(true)
     return
   end
+--  AddAmmo(leaks, amRope, 100)
 --  RemoveEventFunc(CheckPastFlower)
 --  DeleteGear(sniperCrate)
 end