From: Hendrik B. <nh...@us...> - 2010-06-21 21:27:00
|
Update of /cvsroot/arianne/marauroa/src/marauroa/server/game/container In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv17200/src/marauroa/server/game/container Modified Files: PlayerEntry.java Log Message: defined a longer (10 minutes) timeout for players in pre-game Index: PlayerEntry.java =================================================================== RCS file: /cvsroot/arianne/marauroa/src/marauroa/server/game/container/PlayerEntry.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** PlayerEntry.java 12 Jun 2010 14:53:42 -0000 1.55 --- PlayerEntry.java 21 Jun 2010 21:26:52 -0000 1.56 *************** *** 258,264 **** * We define how many milliseconds has to be elapsed until we consider a player has timeout. */ ! public static final long TIMEOUT_MILLISECONDS= 30 * 1000; /** * A counter to detect dropped packets or bad order at client side. We * enumerate each perception so client can know in which order it is --- 258,270 ---- * We define how many milliseconds has to be elapsed until we consider a player has timeout. */ ! private static final long TIMEOUT_IN_GAME_MILLISECONDS= 30 * 1000; /** + * We need a longer timeout pre-game because players might want to create a character here, + * there is no keep-alive yet. + */ + private static final long TIMEOUT_PRE_GAME_MILLISECONDS= 10 * 60 * 1000; + + /** * A counter to detect dropped packets or bad order at client side. We * enumerate each perception so client can know in which order it is *************** *** 318,322 **** */ public boolean isTimeout() { ! return (System.currentTimeMillis()-activityTimestamp)>TIMEOUT_MILLISECONDS; } --- 324,332 ---- */ public boolean isTimeout() { ! if (state==ClientState.GAME_BEGIN) { ! return (System.currentTimeMillis()-activityTimestamp)>TIMEOUT_IN_GAME_MILLISECONDS; ! } else { ! return (System.currentTimeMillis()-activityTimestamp)>TIMEOUT_PRE_GAME_MILLISECONDS; ! } } |