diff options
author | Treeki <treeki@gmail.com> | 2013-01-28 02:34:02 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-01-28 02:34:02 +0100 |
commit | 24bca16d633e04a680128e435f7c90ccb68d2422 (patch) | |
tree | 3473e996cb12e938fb84ca30c861c24653796297 | |
parent | cd5c16bf69f96482a3d5af6581139d894563671e (diff) | |
download | kamek-24bca16d633e04a680128e435f7c90ccb68d2422.tar.gz kamek-24bca16d633e04a680128e435f7c90ccb68d2422.zip |
another thundercloud tile detection fix
-rwxr-xr-x | src/thundercloud.cpp | 6 |
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); } |