summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-18 23:09:24 +0000
committerrubidium <rubidium@openttd.org>2010-11-18 23:09:24 +0000
commit40258d927fecaf3c2e6683718ae7dfa6c0443212 (patch)
treed91332e68260d2d5a1b1b8b04ddd302e3e821245 /src/vehicle.cpp
parented04bef953da730829770e98fc3a91649eeee23e (diff)
downloadopenttd-40258d927fecaf3c2e6683718ae7dfa6c0443212.tar.xz
(svn r21249) -Fix (r21240, r21236) [FS#4242]: rear ends of dualheaded engines didn't smoke nor spark (Hirundo)
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 499f0c49d..ff6039c9a 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1871,7 +1871,7 @@ void Vehicle::UpdateVisualEffect(bool allow_power_change)
default: break;
}
if (default_effect == VE_DEFAULT) {
- if (this->type == VEH_TRAIN && Train::From(this)->IsEngine()) {
+ if (this->type == VEH_TRAIN && !(Train::From(this)->IsWagon() || Train::From(this)->IsArticulatedPart())) {
if (e->u.rail.engclass == 0) {
/* Steam is offset by -4 units */
SB(this->vcache.cached_vis_effect, VE_OFFSET_START, VE_OFFSET_COUNT, VE_OFFSET_CENTRE - 4);
@@ -1955,7 +1955,7 @@ void Vehicle::ShowVisualEffect() const
}
if (effect_type == VE_TYPE_DEFAULT) {
- if (v->type == VEH_TRAIN && Train::From(v)->IsEngine()) {
+ if (v->type == VEH_TRAIN) {
/* Use default effect type for engine class. */
effect_type = RailVehInfo(v->engine_type)->engclass + 1;
} else {