(svn r12205) -Codechange: rename RailVehicleInfo::running_cost_base to running_cost, inline with other vehicle types (It is the factor, not the base)

This commit is contained in:
2008-02-20 20:56:54 +00:00
parent db9d5a909f
commit 79b6b9cb66
5 changed files with 11 additions and 11 deletions

View File

@@ -377,7 +377,7 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
if (rvi->railveh_type == RAILVEH_MULTIHEAD) runcostfact /= 2;
rvi->running_cost_base = runcostfact;
rvi->running_cost = runcostfact;
} break;
case 0x0E: { // Running cost base
@@ -411,14 +411,14 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
if (rvi->railveh_type != RAILVEH_MULTIHEAD) {
// adjust power and running cost if needed
rvi->power /= 2;
rvi->running_cost_base /= 2;
rvi->running_cost /= 2;
}
rvi->railveh_type = RAILVEH_MULTIHEAD;
} else {
if (rvi->railveh_type == RAILVEH_MULTIHEAD) {
// adjust power and running cost if needed
rvi->power *= 2;
rvi->running_cost_base *= 2;
rvi->running_cost *= 2;
}
rvi->railveh_type = rvi->power == 0 ?
RAILVEH_WAGON : RAILVEH_SINGLEHEAD;