CDrone: AcceptScriptMsg fixes

This commit is contained in:
Luke Street 2020-09-06 18:12:15 -04:00
parent 8cb20650fa
commit f93400c8c2
2 changed files with 10 additions and 5 deletions

View File

@ -218,7 +218,7 @@ void CDrone::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateM
}
case EScriptObjectMessage::Deactivate:
case EScriptObjectMessage::Deleted: {
for (TUniqueId& unkId : x7d4_) {
for (TUniqueId& unkId : x7d8_) {
if (unkId != kInvalidUniqueId) {
mgr.FreeScriptObject(unkId);
unkId = kInvalidUniqueId;
@ -228,9 +228,11 @@ void CDrone::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateM
mgr.GetPlayerState()->GetStaticInterference().RemoveSource(GetUniqueId());
if (x578_lightId != kInvalidUniqueId) {
mgr.FreeScriptObject(x578_lightId);
x578_lightId = kInvalidUniqueId;
}
if (x57a_ != kInvalidUniqueId) {
mgr.FreeScriptObject(x57a_);
x57a_ = kInvalidUniqueId;
}
if (x7d0_) {
@ -243,7 +245,7 @@ void CDrone::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateM
x834_29_codeTrigger = true;
break;
case EScriptObjectMessage::OnFloor:
if (!x835_26_ && x834_24_) {
if (!x835_26_ && x834_24_ && !IsAlive()) {
x835_26_ = true;
MassiveFrozenDeath(mgr);
}
@ -822,10 +824,12 @@ void CDrone::SetLightEnabled(CStateManager& mgr, bool activate) {
activate ? EScriptObjectMessage::Activate : EScriptObjectMessage::Deactivate);
}
void CDrone::SetVisorFlareEnabled(CStateManager& mgr, bool activate) {}
void CDrone::SetVisorFlareEnabled(CStateManager& mgr, bool activate) {
// TODO implement
}
void CDrone::UpdateVisorFlare(CStateManager& mgr) {
// TODO: Finish
// TODO implement
}
void CDrone::UpdateTouchBounds(float radius) {

View File

@ -70,11 +70,12 @@ class CDrone : public CPatterned {
zeus::CVector3f x7ac_lightPos;
float x7b8_ = 0.f;
float x7bc_ = 0.f;
float x7c0_ = 0.f;
float x7c4_ = 0.f;
s32 x7c8_ = 0;
s16 x7cc_;
CSfxHandle x7d0_;
rstl::reserved_vector<TUniqueId, 2> x7d4_ = {{kInvalidUniqueId, kInvalidUniqueId}};
rstl::reserved_vector<TUniqueId, 2> x7d8_ = {{kInvalidUniqueId, kInvalidUniqueId}};
rstl::reserved_vector<zeus::CVector3f, 2> x7e0_ = {{zeus::skZero3f, zeus::skZero3f}};
rstl::reserved_vector<zeus::CVector3f, 2> x7fc_ = {{zeus::skZero3f, zeus::skZero3f}};
rstl::reserved_vector<float, 2> x818_ = {{0.f, 0.f}};