diff options
Diffstat (limited to 'src')
-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; } |