(genitem, ship, plane, land): Remove unused member sell & equivalents.

(genitem_ca, ship_ca, plane_ca, land_ca): Remove selector "sell".
(comstr, trdstr): Members trd_price, com_price have no effect.  Use
them instead of trd_maxprice, com_maxprice and remove the latter.
(commodity_ca, trade_ca): Remove selector "maxprice".
This commit is contained in:
Markus Armbruster 2004-03-01 17:21:40 +00:00
parent 95b650396a
commit bb811df758
15 changed files with 19 additions and 36 deletions

View file

@ -127,13 +127,13 @@ buy(void)
for (q = 0; gettrade(q, &tmpt); q++) {
if (tmpt.trd_maxbidder == player->cnum &&
tmpt.trd_unitid >= 0 && tmpt.trd_owner != player->cnum) {
tally += tmpt.trd_maxprice * tradetax;
tally += tmpt.trd_price * tradetax;
}
}
for (q = 0; getcomm(q, &comt); q++) {
if (comt.com_maxbidder == player->cnum &&
comt.com_owner != 0 && comt.com_owner != player->cnum) {
tally += (comt.com_maxprice * comt.com_amount) * buytax;
tally += (comt.com_price * comt.com_amount) * buytax;
}
}
canspend = natp->nat_money - tally;
@ -188,8 +188,8 @@ buy(void)
pr("That lot has been taken off the market.\n");
return RET_FAIL;
}
if (bid > 0.04 + comm.com_maxprice) {
comm.com_maxprice = bid;
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) &&
@ -254,8 +254,8 @@ check_market(void)
monleft = 0;
price = comm.com_maxprice * comm.com_amount * buytax;
gain = comm.com_maxprice * comm.com_amount;
price = comm.com_price * comm.com_amount * buytax;
gain = comm.com_price * comm.com_amount;
natp = getnatp(comm.com_maxbidder);
tmoney = natp->nat_money;