home · contact · privacy
Fix replay mode overwriting save file on quit.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 10 Mar 2015 19:31:35 +0000 (20:31 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 10 Mar 2015 19:31:35 +0000 (20:31 +0100)
roguelike-server

index ffc75e664c2bf9676ed46f882498e803ae3f570e..98a92dff04653ac5cc6063a704d14bc98f63f88e 100755 (executable)
@@ -1141,8 +1141,9 @@ def command_ping():
 
 def command_quit():
     """Abort server process."""
-    save_world()
-    atomic_write(io_db["path_record"], io_db["record_chunk"], do_append=True)
+    if None == opts.replay:
+        save_world()
+        atomic_write(io_db["path_record"], io_db["record_chunk"], do_append=True)
     raise SystemExit("received QUIT command")