fix: shooting gallery bugs (#1347)

fix: reset some more vars

Co-authored-by: Aaron Kimbre <aronwk.aaron@gmail.com>
This commit is contained in:
David Markowitz
2023-12-23 09:50:14 -08:00
committed by GitHub
parent 6b9798595e
commit 5e9355b1ff
5 changed files with 15 additions and 4 deletions

View File

@@ -1040,6 +1040,13 @@ void SGCannon::ResetVars(Entity* self) {
self->SetVar<std::vector<LOT>>(RewardsVariable, {});
self->SetVar<uint32_t>(TotalScoreVariable, 0);
self->SetVar<uint32_t>(u"m_curStreak", 0);
self->SetNetworkVar<float>(u"SuperChargeBar", 0);
self->SetVar<uint32_t>(u"LastSuperTotal", 0);
self->SetNetworkVar<float>(u"SuperChargeBar", 0.0f);
self->SetNetworkVar<bool>(u"ShowStreak", 0);
self->SetNetworkVar<bool>(u"UnMarkAll", true);
const_cast<std::vector<SGEnemy>&>(self->GetVar<std::vector<SGEnemy>>(ActiveSpawnsVariable)).clear();
self->SetVar<std::vector<SGEnemy>>(ActiveSpawnsVariable, {});