Only toggle afk mode when it's not your turn
authorunc0rr
Mon, 04 Nov 2013 01:23:20 +0400
changeset 9671 6e95617988c9
parent 9670 1954f692e8c6
child 9674 8f2b0b925513
Only toggle afk mode when it's not your turn
hedgewars/uCommandHandlers.pas
--- a/hedgewars/uCommandHandlers.pas	Sun Nov 03 22:39:00 2013 +0400
+++ b/hedgewars/uCommandHandlers.pas	Mon Nov 04 01:23:20 2013 +0400
@@ -643,7 +643,10 @@
 if gameType <> gmtNet then
     isPaused:= not isPaused
     else
-    isAFK:= not isAFK;
+    if (CurrentTeam^.ExtDriven) or (CurrentHedgehog^.BotLevel > 0) then
+        isAFK:= not isAFK
+    else
+        isAFK:= false; // for real ninjas
 
 if isPaused or isAFK then
     SDL_ShowCursor(1)