fix EndGame call. w/o a proper exit, demos weren't being saved
authornemo
Tue, 29 Jan 2013 13:45:31 -0500
changeset 8460 75e771c3c039
parent 8459 d0c60699f606
child 8461 69bd802c28f0
child 8462 19b1de9423ab
fix EndGame call. w/o a proper exit, demos weren't being saved
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Tue Jan 29 17:28:47 2013 +0400
+++ b/hedgewars/uScript.pas	Tue Jan 29 13:45:31 2013 -0500
@@ -1281,7 +1281,7 @@
 function lc_endgame(L : Plua_State) : LongInt; Cdecl;
 begin
     L:= L; // avoid compiler hint
-    GameState:= gsExit;
+    AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000);
     lc_endgame:= 0
 end;