summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);
}