From 1721d70212f9543985569bd06690409b6b51d1dc Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 24 Jan 2016 14:44:47 +0000 Subject: [PATCH] - Removed duplicate autoskip code. --- src/wi_stuff.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index e931b33fd..09861086b 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -1096,6 +1096,11 @@ void WI_End () } } +bool WI_autoSkip() +{ + return wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE); +} + void WI_initNoState () { state = NoState; @@ -1114,7 +1119,7 @@ void WI_updateNoState () else { bool noauto = noautostartmap; - bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE)); + bool autoskip = WI_autoSkip(); for (int i = 0; !noauto && i < MAXPLAYERS; ++i) { @@ -1254,7 +1259,7 @@ void WI_updateDeathmatchStats () int i; bool stillticking; - bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE)); + bool autoskip = WI_autoSkip(); WI_updateAnimatedBack(); @@ -1506,7 +1511,7 @@ void WI_updateNetgameStats () int i; int fsum; bool stillticking; - bool autoskip = (wi_autoadvance > 0 && bcnt > (wi_autoadvance * TICRATE)); + bool autoskip = WI_autoSkip(); WI_updateAnimatedBack ();