summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2013-02-04 17:39:20 +0400
committerAndrey Nazarov <skuller@skuller.net>2013-02-04 17:39:20 +0400
commit5dd46c64b7ead60adf74f06b6fa419dad8d0b253 (patch)
tree0b830035a014b7c6dde494f4fd715762c0735c58
parent7920fadd18067b666f21c3976265af2cfc151e87 (diff)
Disallow negative ‘scr_conspeed’ values.
-rw-r--r--src/client/console.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/console.c b/src/client/console.c
index 8252b05..f91e527 100644
--- a/src/client/console.c
+++ b/src/client/console.c
@@ -964,6 +964,11 @@ void Con_RunConsole(void)
con.destHeight = 0; // none visible
}
+ if (con_speed->value <= 0) {
+ con.currentHeight = con.destHeight;
+ return;
+ }
+
if (con.currentHeight > con.destHeight) {
con.currentHeight -= con_speed->value * cls.frametime;
if (con.currentHeight < con.destHeight) {