diff --git a/src/lib/commands/buy.c b/src/lib/commands/buy.c index e7a8ef70..f3c36151 100644 --- a/src/lib/commands/buy.c +++ b/src/lib/commands/buy.c @@ -161,16 +161,10 @@ buy(void) return RET_FAIL; if (bid > 0.04 + comm.com_price) { comm.com_price = bid; - /* Add five minutes to the time if less than 5 minutes */ time(&now); - if (((MARK_DELAY - (now - comm.com_markettime)) < 300) && - comm.com_maxbidder != player->cnum) { - comm.com_markettime += 300; - /* Special case - what if so much time has gone by? Well, - Just reset the markettime so that only 5 minutes are left */ - if ((MARK_DELAY - (now - comm.com_markettime)) < 0) - comm.com_markettime = (now - (MARK_DELAY - 300)); - } + if (comm.com_markettime + MARK_DELAY - now < minutes(5) && + comm.com_maxbidder != player->cnum) + comm.com_markettime = now + minutes(5) - MARK_DELAY; comm.com_maxbidder = player->cnum; comm.com_x = x; comm.com_y = y; diff --git a/src/lib/commands/trad.c b/src/lib/commands/trad.c index fa122e8b..6a850568 100644 --- a/src/lib/commands/trad.c +++ b/src/lib/commands/trad.c @@ -254,11 +254,10 @@ trad(void) return RET_OK; } if (bid > trade.trd_price) { - /* Add five minutes to the time if less than 5 minutes left. */ time(&now); - if (((TRADE_DELAY - (now - trade.trd_markettime)) < 300) && + if (trade.trd_markettime + TRADE_DELAY - now < minutes(5) && trade.trd_maxbidder != player->cnum) - trade.trd_markettime += 300; + trade.trd_markettime = now + minutes(5) - TRADE_DELAY; trade.trd_price = bid; trade.trd_maxbidder = player->cnum; trade.trd_x = sx;