diff options
Diffstat (limited to 'src/thundercloud.cpp')
-rwxr-xr-x | src/thundercloud.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/thundercloud.cpp b/src/thundercloud.cpp index 0f7b63d..ad01391 100755 --- a/src/thundercloud.cpp +++ b/src/thundercloud.cpp @@ -181,14 +181,15 @@ void dThunderCloud::dieFall_Execute() { if (Player == 0) { this->pos.x = 0; - doStateChange(&StateID_Follow); } - else { - Player->pos; + } else { this->pos.x = Player->pos.x - 300; } this->pos.y = this->Baseline; + + SpawnEffect("Wm_en_blockcloud", 0, &pos, &(const S16Vec){0,0,0}, &(const Vec){1.0f,1.0f,1.0f}); + scale.x = scale.y = scale.z = 0.0f; this->aPhysics.addToList(); doStateChange(&StateID_Follow); } @@ -271,6 +272,11 @@ int dThunderCloud::onDelete() { } int dThunderCloud::onExecute() { + if (scale.x < 1.0f) + scale.x = scale.y = scale.z = scale.x + 0.0375f; + else + scale.x = scale.y = scale.z = 1.0f; + acState.execute(); updateModelMatrices(); bodyModel._vf1C(); @@ -390,6 +396,11 @@ void dThunderCloud::endState_Wait() { } // Lightning State +static void lightningCallback(ActivePhysics *one, ActivePhysics *two) { + if (one->owner->name == WM_BUBBLE && two->owner->name == WM_BUBBLE) + return; + dEn_c::collisionCallback(one, two); +} void dThunderCloud::lightningStrike() { PlaySound(this, SE_OBJ_KAZAN_ERUPTION); @@ -402,9 +413,9 @@ void dThunderCloud::lightningStrike() { Shock.yDistToCenter = boltpos; Shock.category1 = 0x3; Shock.category2 = 0x9; - Shock.bitfield1 = 0x4F; + Shock.bitfield1 = 0x4D; - Shock.bitfield2 = 0xffba7ffe; + Shock.bitfield2 = 0x420; Shock.xDistToEdge = 12.0; Shock.yDistToEdge = boltsize; @@ -416,10 +427,11 @@ void dThunderCloud::lightningStrike() { } void dThunderCloud::beginState_Lightning() { - this->speed.x = 0.0; - float backupY = pos.y, backupYSpeed = speed.y; + speed.x = 0.0; + speed.y = -1.0f; + u32 result = 0; while (result == 0 && below.y > (-30 << 16)) { below.y -= 0x4000; @@ -489,6 +501,7 @@ void dThunderCloud::executeState_Lightning() { if (timer == 2 && usingEvents) { if (dFlagMgr_c::instance->flags & eventFlag) { } else { + this->Lightning.removeFromList(); doStateChange(&StateID_Wait); } } else { |