summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/patches/i225-hide-black-squares-bug.patch20
-rw-r--r--debian/patches/series1
2 files changed, 21 insertions, 0 deletions
diff --git a/debian/patches/i225-hide-black-squares-bug.patch b/debian/patches/i225-hide-black-squares-bug.patch
new file mode 100644
index 0000000..8425043
--- /dev/null
+++ b/debian/patches/i225-hide-black-squares-bug.patch
@@ -0,0 +1,20 @@
+Description: Hide upstream issue #225 "Black rectangles shows due to particle and fire effects"
+Author: Didier Raboud <odyx@debian.org>
+Origin: vendor
+Forwarded: https://github.com/colobot/colobot/issues/225
+Last-Updated: 2013-11-26
+--- a/src/graphics/engine/particle.cpp
++++ b/src/graphics/engine/particle.cpp
+@@ -2875,6 +2875,12 @@
+ vertex[2] = Vertex(corner[3], n, Math::Point(m_particle[i].texSup.x, m_particle[i].texInf.y));
+ vertex[3] = Vertex(corner[2], n, Math::Point(m_particle[i].texInf.x, m_particle[i].texInf.y));
+
++ // On first call, the coordinates are all 0, in that case, return as it's wrong.
++ if((m_particle[i].texSup.x-m_particle[i].texInf.x) == 0.0f || (m_particle[i].texSup.y - m_particle[i].texInf.y) == 0.0f ) {
++ // One particle texture dimension is zero, most probably wrong!
++ // Don't display it then.
++ return;
++ }
+ m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, vertex, 4);
+ m_engine->AddStatisticTriangle(2);
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..779db1a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+i225-hide-black-squares-bug.patch