X-Git-Url: http://git.pond.sub.org/?p=empserver;a=blobdiff_plain;f=src%2Flib%2Fcommands%2Fbuy.c;h=12e60bc1231c045193b234d8c32239530e14b088;hp=f3c36151055df31b75511c48d0992e9b174d2794;hb=375e5170e47c4e47ffab5918288aafad92844b21;hpb=c5f76e58534bd0760730863b729ce2bc3f054b76 diff --git a/src/lib/commands/buy.c b/src/lib/commands/buy.c index f3c361510..12e60bc12 100644 --- a/src/lib/commands/buy.c +++ b/src/lib/commands/buy.c @@ -30,6 +30,7 @@ * Dave Pare, 1986 * Pat Loney, 1992 * Steve McClure, 1996-2000 + * Markus Armbruster, 2004-2013 */ #include @@ -190,7 +191,6 @@ check_market(void) int m; int n; time_t now; - double tleft; double gain; double price; @@ -198,10 +198,7 @@ check_market(void) if (comm.com_maxbidder == comm.com_owner || comm.com_owner == 0) continue; (void)time(&now); - tleft = MARK_DELAY / 3600.0 - (now - comm.com_markettime) / 3600.0; - if (tleft < 0) - tleft = 0; - if (tleft > 0.0) + if (comm.com_markettime + MARK_DELAY > now) continue; if (CANT_HAPPEN(comm.com_type <= I_NONE || comm.com_type > I_MAX)) continue;