summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-08-23 10:44:32 +0000
committerfrosch <frosch@openttd.org>2014-08-23 10:44:32 +0000
commit17872c8be1429d4d2a7dafd8676655faaa53ca1b (patch)
treeaa0428eff310dd51f892d5009ac9eb3f8ef6126b
parenta81e092daf5bd96c7211e5e308874738b7ec5853 (diff)
downloadopenttd-17872c8be1429d4d2a7dafd8676655faaa53ca1b.tar.xz
(svn r26755) -Fix (r26747) [FS#6093]: Silence MSVC warning.
-rw-r--r--src/vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 5eee54041..81d511e64 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2360,7 +2360,7 @@ static void SpawnAdvancedVisualEffect(const Vehicle *v)
int8 l_center = 0;
if (auto_center) {
/* For road vehicles: Compute offset from vehicle position to vehicle center */
- if (v->type == VEH_ROAD) l_center = -(VEHICLE_LENGTH - RoadVehicle::From(v)->gcache.cached_veh_length) / 2;
+ if (v->type == VEH_ROAD) l_center = -(int)(VEHICLE_LENGTH - RoadVehicle::From(v)->gcache.cached_veh_length) / 2;
} else {
/* For trains: Compute offset from vehicle position to sprite position */
if (v->type == VEH_TRAIN) l_center = (VEHICLE_LENGTH - Train::From(v)->gcache.cached_veh_length) / 2;