]> git.cworth.org Git - empires-server/blobdiff - empathy.js
Don't let a new prompt get started when another is active
[empires-server] / empathy.js
index 8ecf9e10fc9bb26e2a2068a65dfb87a420138b15..29d31bf7d46fbd0595e2ad8e6b3506057da387db 100644 (file)
@@ -43,6 +43,11 @@ class Empathy extends Game {
     if (! prompt)
       return false;
 
+    /* Ignore any start request that comes in while a prompt is
+     * already being played. */
+    if (this.state.active_prompt)
+      return false;
+
     this.state.active_prompt = prompt;
 
     this.broadcast_event_object('start', prompt);