diff options
author | fonsinchen <fonsinchen@openttd.org> | 2014-05-01 14:48:44 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2014-05-01 14:48:44 +0000 |
commit | c915d9fa55e8bb42b33c56b94c5a5e0ff446d7da (patch) | |
tree | d908c9f08f9ba22552bb21121936e5d279e00c4b /src/vehicle.cpp | |
parent | 4ef537ba338c44a84b4defcce5aa24554edcde22 (diff) | |
download | openttd-c915d9fa55e8bb42b33c56b94c5a5e0ff446d7da.tar.xz |
(svn r26546) -Codechange: Make order wait_time, travel_time and max_speed private
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 415b8e56a..cc781b48d 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2137,7 +2137,7 @@ void Vehicle::HandleLoading(bool mode) { switch (this->current_order.GetType()) { case OT_LOADING: { - uint wait_time = max(this->current_order.wait_time - this->lateness_counter, 0); + uint wait_time = max(this->current_order.GetWaitTime() - this->lateness_counter, 0); /* Not the first call for this tick, or still loading */ if (mode || !HasBit(this->vehicle_flags, VF_LOADING_FINISHED) || this->current_order_time < wait_time) return; @@ -2375,9 +2375,9 @@ void Vehicle::ShowVisualEffect() const } max_speed = min(max_speed, t->gcache.cached_max_track_speed); - max_speed = min(max_speed, this->current_order.max_speed); + max_speed = min(max_speed, this->current_order.GetMaxSpeed()); } - if (this->type == VEH_ROAD || this->type == VEH_SHIP) max_speed = min(max_speed, this->current_order.max_speed * 2); + if (this->type == VEH_ROAD || this->type == VEH_SHIP) max_speed = min(max_speed, this->current_order.GetMaxSpeed() * 2); const Vehicle *v = this; |