From 7a72dcb3b57b70214c4d402be89f9b1dd158d790 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 18 Jun 2007 21:00:14 +0000 Subject: (svn r10207) -Codechange: remove the redundant player_money in favour of the money64, which is now renamed to player_money. --- src/autoreplace_cmd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/autoreplace_cmd.cpp') diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 0a2fd313c..37e0f79d8 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -260,7 +260,7 @@ static CommandCost ReplaceVehicle(Vehicle **w, byte flags, int32 total_cost) /* Ensure that the player will not end up having negative money while autoreplacing * This is needed because the only other check is done after the income from selling the old vehicle is substracted from the cost */ - if (CmdFailed(tmp_move) || p->money64 < (cost.GetCost() + total_cost)) { + if (CmdFailed(tmp_move) || p->player_money < (cost.GetCost() + total_cost)) { SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES); /* Pay back the loan */ sell_value.MultiplyCost(-1); @@ -372,8 +372,8 @@ CommandCost MaybeReplaceVehicle(Vehicle *v, bool check, bool display_costs) cost.AddCost(temp_cost); } while (w->type == VEH_TRAIN && (w = GetNextVehicle(w)) != NULL); - if (!(flags & DC_EXEC) && (p->money64 < (int32)(cost.GetCost() + p->engine_renew_money) || cost.GetCost() == 0)) { - if (!check && p->money64 < (int32)(cost.GetCost() + p->engine_renew_money) && ( _local_player == v->owner ) && cost.GetCost() != 0) { + if (!(flags & DC_EXEC) && (p->player_money < (cost.GetCost() + p->engine_renew_money) || cost.GetCost() == 0)) { + if (!check && p->player_money < (cost.GetCost() + p->engine_renew_money) && ( _local_player == v->owner ) && cost.GetCost() != 0) { StringID message; SetDParam(0, v->unitnumber); switch (v->type) { -- cgit v1.2.3-54-g00ecf