]> git.pond.sub.org Git - empserver/blobdiff - src/lib/common/game.c
Update known contributors comments
[empserver] / src / lib / common / game.c
index 29624624ebbb45e4ea41e937527e0332eda3d63c..5a4f4c11382d0e52c524f4899446478553327b84 100644 (file)
@@ -28,7 +28,7 @@
  *  game.c: Game file access
  *
  *  Known contributors to this file:
- *     Markus Armbruster, 2007-2008
+ *     Markus Armbruster, 2007-2009
  */
 
 /*
@@ -51,7 +51,7 @@
 #include "server.h"
 
 /*
- * Disable updates
+ * Enable / disable updates
  */
 void
 game_ctrl_update(int enable)
@@ -71,6 +71,27 @@ updates_disabled(void)
     return getgamep()->game_upd_disable;
 }
 
+/*
+ * Enable / disable play
+ */
+void
+game_ctrl_play(int enable)
+{
+    struct gamestr *game = getgamep();
+
+    game->game_down = !enable;
+    putgame();
+}
+
+/*
+ * Is playing enabled?
+ */
+int
+game_play_disabled(void)
+{
+    return getgamep()->game_down;
+}
+
 /*
  * Notice that a player broke sanctuary.
  * This starts the Empire clock if it hasn't been started yet.