mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r22006) -Fix [FS#4480]: smoke/sparks of trains would be shown under bridges, or rather through bridges
This commit is contained in:
parent
4828ed94ba
commit
64cba95fbe
@ -50,6 +50,7 @@
|
|||||||
#include "effectvehicle_func.h"
|
#include "effectvehicle_func.h"
|
||||||
#include "effectvehicle_base.h"
|
#include "effectvehicle_base.h"
|
||||||
#include "vehiclelist.h"
|
#include "vehiclelist.h"
|
||||||
|
#include "bridge_map.h"
|
||||||
#include "tunnel_map.h"
|
#include "tunnel_map.h"
|
||||||
#include "depot_map.h"
|
#include "depot_map.h"
|
||||||
|
|
||||||
@ -2108,11 +2109,13 @@ void Vehicle::ShowVisualEffect() const
|
|||||||
/* Show no smoke when:
|
/* Show no smoke when:
|
||||||
* - Smoke has been disabled for this vehicle
|
* - Smoke has been disabled for this vehicle
|
||||||
* - The vehicle is not visible
|
* - The vehicle is not visible
|
||||||
|
* - The vehicle is under a bridge
|
||||||
* - The vehicle is on a depot tile
|
* - The vehicle is on a depot tile
|
||||||
* - The vehicle is on a tunnel tile
|
* - The vehicle is on a tunnel tile
|
||||||
* - The vehicle is a train engine that is currently unpowered */
|
* - The vehicle is a train engine that is currently unpowered */
|
||||||
if (disable_effect ||
|
if (disable_effect ||
|
||||||
v->vehstatus & VS_HIDDEN ||
|
v->vehstatus & VS_HIDDEN ||
|
||||||
|
(MayHaveBridgeAbove(v->tile) && IsBridgeAbove(v->tile)) ||
|
||||||
IsDepotTile(v->tile) ||
|
IsDepotTile(v->tile) ||
|
||||||
IsTunnelTile(v->tile) ||
|
IsTunnelTile(v->tile) ||
|
||||||
(v->type == VEH_TRAIN &&
|
(v->type == VEH_TRAIN &&
|
||||||
|
Loading…
Reference in New Issue
Block a user