diff options
author | Treeki <treeki@gmail.com> | 2013-02-10 01:04:31 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-02-10 01:04:31 +0100 |
commit | 8f4edaa7abf19844bf93a369750486428c370384 (patch) | |
tree | 1508def502ebc67b1046af4760b28b94d07ea8d5 /src | |
parent | afda095c6b63710f5632bdb77894aaa4c5c39ea2 (diff) | |
download | kamek-8f4edaa7abf19844bf93a369750486428c370384.tar.gz kamek-8f4edaa7abf19844bf93a369750486428c370384.zip |
podouble splashes
Diffstat (limited to '')
-rw-r--r-- | src/bossPodouble.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/bossPodouble.cpp b/src/bossPodouble.cpp index dae1426..22a3628 100644 --- a/src/bossPodouble.cpp +++ b/src/bossPodouble.cpp @@ -286,7 +286,30 @@ int daPodouble::onDelete() { int daPodouble::onExecute() { acState.execute(); - + + float diff = 8.57f * scale.x; + float checkY = pos.y - diff, checkLastY = last_pos.y - diff; + + VEC2 myPos = {pos.x, checkY}; + VEC2 outBlockPos; + float outFloat; + s16 outAngle; + int result = dWaterManager_c::instance->queryPosition(&myPos, &outBlockPos, &outFloat, &outAngle, currentLayerID); + + if ((!isFire && result == 0) || (isFire && result == 1)) { + if ((checkLastY <= outFloat && outFloat < checkY) || (checkY <= outFloat && outFloat < checkLastY)) { + VEC3 efPos = {pos.x, checkY, 6500.0f}; + VEC3 efScale = {scale.x * 0.7f, scale.y * 0.7f, scale.z * 0.7f}; + SpawnEffect(isFire ? "Wm_en_magmawave" : "Wm_en_waterwave_in", 0, &efPos, 0, &efScale); + + if (checkLastY <= outFloat && outFloat < checkY) { + dBgGm_c::instance->makeSplash(pos.x, checkY, 0x11); + } else { + dBgGm_c::instance->makeSplash(pos.x, checkY, 0x10); + } + } + } + return true; } |