forked from mirror/OpenTTD
(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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user