summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-01-28 02:34:02 +0100
committerTreeki <treeki@gmail.com>2013-01-28 02:34:02 +0100
commit24bca16d633e04a680128e435f7c90ccb68d2422 (patch)
tree3473e996cb12e938fb84ca30c861c24653796297 /src
parentcd5c16bf69f96482a3d5af6581139d894563671e (diff)
downloadkamek-24bca16d633e04a680128e435f7c90ccb68d2422.tar.gz
kamek-24bca16d633e04a680128e435f7c90ccb68d2422.zip
another thundercloud tile detection fix
Diffstat (limited to 'src')
-rwxr-xr-xsrc/thundercloud.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/thundercloud.cpp b/src/thundercloud.cpp
index 387b395..50fce31 100755
--- a/src/thundercloud.cpp
+++ b/src/thundercloud.cpp
@@ -434,10 +434,16 @@ void dThunderCloud::beginState_Lightning() {
u32 result = 0;
while (result == 0 && below.y > (-30 << 16)) {
+ pos.y = backupY;
below.y -= 0x4000;
//OSReport("Sending out leader to %d", below.y>>12);
result = collMgr.calculateBelowCollisionWithSmokeEffect();
+ if (result == 0) {
+ u32 tb1 = collMgr.getTileBehaviour1At(pos.x, pos.y + (below.y >> 12), 0);
+ if (tb1 & 0x8000 && !(tb1 & 0x20))
+ result = 1;
+ }
//OSReport("Result %d", result);
}