X-Git-Url: http://git.shiar.nl/netris.git/blobdiff_plain/ddbae5789635a63fcf36a84056f9df4bc8b6adaa..b9acedeb4df336717c043378799fe005118b1fc6:/client.c diff --git a/client.c b/client.c index 6110445..c4de9b1 100644 --- a/client.c +++ b/client.c @@ -346,6 +346,7 @@ void OneGame(void) gameStatus = 0; return; case CT_pause: + if (Players[me].alive <= 0) return; Players[me].flags ^= SCF_paused; if (Game.started > 1) Message(Players[me].flags & SCF_paused @@ -442,6 +443,9 @@ void OneGame(void) case KT_quit: handle_cmd(CT_quit, NULL); return 1; + case KT_pause: + handle_cmd(CT_pause, NULL); + return 1; default: return 0; } @@ -449,14 +453,7 @@ void OneGame(void) // global actions (always possible, even if not playing) if (handle_key(key)) return; - if (Players[me].alive <= 0) return; - // actions available while in game - switch (key) { - case KT_pause: - return handle_cmd(CT_pause, NULL); - } - - if (paused) return; + if (Players[me].alive <= 0 || paused) return; // actions only available while actually playing switch (key) { case KT_left: