From 1d79f93affaf93c29cdc89bcc123441d04c1496d Mon Sep 17 00:00:00 2001 From: scw Date: Sat, 3 Sep 2005 16:02:39 +0000 Subject: Fix last commit: time calculating considered "counting mode" git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3127 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chess.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mbbsd/chess.c') diff --git a/mbbsd/chess.c b/mbbsd/chess.c index c44b669f..b50ade04 100644 --- a/mbbsd/chess.c +++ b/mbbsd/chess.c @@ -223,9 +223,12 @@ ChessStepMade(ChessInfo* info, int who) { if (!info->timelimit) info->lefttime[who] = info->constants->traditional_timeout; - else if (info->lefthand[who]) - info->lefthand[who]--; - else if (info->lefthand[who] == 0 && info->lefttime[who] <= 0) { + else if ( + (info->lefthand[who] && (--(info->lefthand[who]) == 0) && + info->timelimit->time_mode == CHESS_TIMEMODE_COUNTING) + || + (info->lefthand[who] == 0 && info->lefttime[who] <= 0) + ) { info->lefthand[who] = info->timelimit->limit_hand; info->lefttime[who] = info->timelimit->limit_time; } -- cgit v1.2.3