diff options
author | Holger Zickner <[email protected]> | 2004-08-27 21:05:04 +0000 |
---|---|---|
committer | Holger Zickner <[email protected]> | 2004-08-27 21:05:04 +0000 |
commit | 609d48b41513fa442ca714c002b271cc18d1941c (patch) | |
tree | 16a6c340b336d0e02a8e769a08bcc2b5e026af17 /src | |
parent | eff7e24ea4852bfbc0492f88b52210fe4515fdbe (diff) |
don't eat the whole cpu when not in game mode
Diffstat (limited to 'src')
-rw-r--r-- | src/jake2/client/CL.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jake2/client/CL.java b/src/jake2/client/CL.java index 25d8ab6..2cb6128 100644 --- a/src/jake2/client/CL.java +++ b/src/jake2/client/CL.java @@ -2,7 +2,7 @@ * CL.java * Copyright (C) 2004 * - * $Id: CL.java,v 1.7 2004-08-18 20:27:35 hzi Exp $ + * $Id: CL.java,v 1.8 2004-08-27 21:05:04 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -1549,6 +1549,11 @@ public final class CL extends CL_pred { SCR.RunConsole(); cls.framecount++; + if (cls.state != ca_active || cls.key_dest != key_game) { + try { + Thread.sleep(20); + } catch (InterruptedException e) {} + } } // ============================================================================ |