summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-21 12:44:38 +0000
committerrubidium <rubidium@openttd.org>2014-09-21 12:44:38 +0000
commit14a599409e2e73b7a31b12f80741baa07fc7502c (patch)
treeb8c388932397cd549fd5e44dcdec16065c483101
parent7b27a28f0a961f23b2998b65a06723fcfc3a3535 (diff)
downloadopenttd-14a599409e2e73b7a31b12f80741baa07fc7502c.tar.xz
(svn r26888) -Codechange: use ints for some z-levels of vehicles (ic111)
-rw-r--r--src/ground_vehicle.hpp4
-rw-r--r--src/roadveh_cmd.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp
index c38c6c4b7..56b97875f 100644
--- a/src/ground_vehicle.hpp
+++ b/src/ground_vehicle.hpp
@@ -231,9 +231,9 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
* @param update_delta Indicates to also update the delta.
* @return Old height of the vehicle.
*/
- inline byte UpdateInclination(bool new_tile, bool update_delta)
+ inline int UpdateInclination(bool new_tile, bool update_delta)
{
- byte old_z = this->z_pos;
+ int old_z = this->z_pos;
if (new_tile) {
this->UpdateZPositionAndInclination();
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 4e034b1f4..d1d5a0c23 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -847,7 +847,7 @@ static void RoadVehCheckOvertake(RoadVehicle *v, RoadVehicle *u)
v->overtaking = RVSB_DRIVE_SIDE;
}
-static void RoadZPosAffectSpeed(RoadVehicle *v, byte old_z)
+static void RoadZPosAffectSpeed(RoadVehicle *v, int old_z)
{
if (old_z == v->z_pos || _settings_game.vehicle.roadveh_acceleration_model != AM_ORIGINAL) return;