Move to shared pointer

This commit is contained in:
David Markowitz
2023-06-07 00:23:50 -07:00
parent ea9d0d8592
commit 9e9e4dc087
219 changed files with 743 additions and 748 deletions

View File

@@ -10,7 +10,7 @@ void EnemyRoninSpawner::OnStartup(Entity* self) {
void EnemyRoninSpawner::OnTimerDone(Entity* self, std::string timerName) {
if (timerName == "hatchTime") {
auto* renderComponent = self->GetComponent<RenderComponent>();
auto renderComponent = self->GetComponent<RenderComponent>();
if (renderComponent != nullptr) {
renderComponent->PlayEffect(644, u"create", "BurstFX1");
@@ -42,7 +42,7 @@ void EnemyRoninSpawner::OnProximityUpdate(Entity* self, Entity* entering, std::s
if (entering->IsPlayer() && name == "ronin" && status == "ENTER" && !self->GetVar<bool>(u"hatching")) {
StartHatching(self);
auto* skillComponent = self->GetComponent<SkillComponent>();
auto skillComponent = self->GetComponent<SkillComponent>();
if (skillComponent != nullptr) {
skillComponent->CalculateBehavior(305, 3568, LWOOBJID_EMPTY);
@@ -59,7 +59,7 @@ void EnemyRoninSpawner::OnHit(Entity* self, Entity* attacker) {
void EnemyRoninSpawner::StartHatching(Entity* self) {
self->SetVar(u"hatching", true);
auto* renderComponent = self->GetComponent<RenderComponent>();
auto renderComponent = self->GetComponent<RenderComponent>();
if (renderComponent != nullptr) {
renderComponent->PlayEffect(2260, u"rebuild_medium", "WakeUpFX1");