CDrone: Implement Dead

This commit is contained in:
Luke Street 2020-09-15 02:40:42 -04:00
parent 5f4335c861
commit 5b166b7be5
2 changed files with 27 additions and 0 deletions

View File

@ -1158,4 +1158,30 @@ void CDrone::sub_801656d4(const zeus::CTransform& xf, CStateManager& mgr) {
mgr.sub_80044098(*x56c_.GetObj(), result, id, x5ac_.GetWeaponMode(), 1, xe6_27_thermalVisorFlags);
}
void CDrone::Dead(CStateManager& mgr, EStateMsg msg, float arg) {
if (msg == EStateMsg::Activate) {
x460_knockBackController.SetAutoResetImpulse(false);
if (x834_31_attackOver) {
SetMomentumWR({0.f, 0.f, -GetWeight()});
} else {
Stop();
SetVelocityWR(zeus::skZero3f);
SetMomentumWR(zeus::skZero3f);
}
x401_26_disableMove = true;
x5c8_ = 0.f;
SetVisorFlareEnabled(mgr, false);
x7c8_ = 0;
} else if (msg == EStateMsg::Update && x7c0_ == 0) {
if (x834_31_attackOver) {
GetBodyController()->GetCommandMgr().DeliverCmd(CBCHurledCmd());
x7c8_ = 1;
} else {
GetBodyController()->GetCommandMgr().DeliverCmd(CBCKnockDownCmd(zeus::skZero3f, pas::ESeverity::Zero));
x7c8_ = 1;
Stop();
}
}
}
} // namespace urde::MP1

View File

@ -166,6 +166,7 @@ public:
bool ShouldMove(CStateManager&, float arg) override;
bool CodeTrigger(CStateManager&, float arg) override;
void Burn(float duration, float damage) override;
void Dead(CStateManager& mgr, EStateMsg msg, float arg) override;
CPathFindSearch* GetSearchPath() override;
virtual void BuildNearList(EMaterialTypes includeMat, EMaterialTypes excludeMat,
rstl::reserved_vector<TUniqueId, 1024>& listOut, float radius, CStateManager& mgr);