summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-02-07 09:50:20 +0000
committerrubidium <rubidium@openttd.org>2011-02-07 09:50:20 +0000
commit64cba95fbedc66c1da8802380e9eb85d6ad6abe4 (patch)
treea37dced0a0f6e4edcc40b0635b7ef255a4025d92
parent4828ed94baeb65d25afd1421bbad25205d80029e (diff)
downloadopenttd-64cba95fbedc66c1da8802380e9eb85d6ad6abe4.tar.xz
(svn r22006) -Fix [FS#4480]: smoke/sparks of trains would be shown under bridges, or rather through bridges
-rw-r--r--src/vehicle.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index d04bc3eab..1c55ff95b 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -50,6 +50,7 @@
#include "effectvehicle_func.h"
#include "effectvehicle_base.h"
#include "vehiclelist.h"
+#include "bridge_map.h"
#include "tunnel_map.h"
#include "depot_map.h"
@@ -2108,11 +2109,13 @@ void Vehicle::ShowVisualEffect() const
/* Show no smoke when:
* - Smoke has been disabled for this vehicle
* - The vehicle is not visible
+ * - The vehicle is under a bridge
* - The vehicle is on a depot tile
* - The vehicle is on a tunnel tile
* - The vehicle is a train engine that is currently unpowered */
if (disable_effect ||
v->vehstatus & VS_HIDDEN ||
+ (MayHaveBridgeAbove(v->tile) && IsBridgeAbove(v->tile)) ||
IsDepotTile(v->tile) ||
IsTunnelTile(v->tile) ||
(v->type == VEH_TRAIN &&