summaryrefslogtreecommitdiff
path: root/openttd-git/chunnel-underground-pre.patch
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-01-03 22:54:09 +0100
committerErich Eckner <git@eckner.net>2021-01-03 22:56:48 +0100
commit8b59f007c39b268c8c676ea698be5ade30b363ee (patch)
treeb48de832c057b803f48768c7f4b812b6c0aa82b4 /openttd-git/chunnel-underground-pre.patch
parent50571c1935d0378cd5757cc1342be3fc7a8efcc3 (diff)
downloadarchlinuxewe.git.save-8b59f007c39b268c8c676ea698be5ade30b363ee.tar.xz
openttd-git: really fix chunnel.patch
Diffstat (limited to 'openttd-git/chunnel-underground-pre.patch')
-rw-r--r--openttd-git/chunnel-underground-pre.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/openttd-git/chunnel-underground-pre.patch b/openttd-git/chunnel-underground-pre.patch
new file mode 100644
index 00000000..4a055d66
--- /dev/null
+++ b/openttd-git/chunnel-underground-pre.patch
@@ -0,0 +1,22 @@
+--- a/chunnel.pre.patch 2021-01-03 22:30:58.721115549 +0100
++++ b/chunnel.pre.patch 2021-01-03 22:30:58.721115549 +0100
+@@ -790,7 +790,7 @@
+ Slope end_tileh;
+ for (;;) {
+ @@ -672,13 +675,69 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
+- if (!IsValidTile(end_tile)) return_cmd_error(STR_ERROR_TUNNEL_THROUGH_MAP_BORDER);
++
+ end_tileh = GetTileSlope(end_tile, &end_z);
+
+ - if (start_z == end_z) break;
+@@ -1015,9 +1015,9 @@
+ if (v->type == VEH_EFFECT) {
+ /* Check whether the vehicle shall be transparent/invisible due to GUI settings.
+ @@ -1139,7 +1147,7 @@ void ViewportAddVehicles(DrawPixelInfo *dpi)
+- const Vehicle *v = _vehicle_viewport_hash[x + y]; // already masked & 0xFFF
+
+ while (v != nullptr) {
++ if (LayerIndex(v->tile) == dpi->layer)
+ - if (!(v->vehstatus & VS_HIDDEN) &&
+ + if (v->IsDrawn() &&
+ l <= v->coord.right &&