Skip to content

Commit

Permalink
Fixed issues with gameobject despawning.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnchyDev committed Oct 22, 2023
1 parent 244e8d1 commit 40afbfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scripts/ToSInstanceScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,19 @@ void ToSInstanceScript::DespawnCurseCrystals()
{
if (curseCrystal1)
{
curseCrystal1->DespawnOrUnsummon(1s);
curseCrystal1->Delete();
curseCrystal1 = nullptr;
}

if (curseCrystal2)
{
curseCrystal2->DespawnOrUnsummon(1s);
curseCrystal2->Delete();
curseCrystal2 = nullptr;
}

if (curseCrystal3)
{
curseCrystal3->DespawnOrUnsummon(1s);
curseCrystal3->Delete();
curseCrystal3 = nullptr;
}
}
Expand Down Expand Up @@ -816,7 +816,7 @@ void ToSInstanceScript::CleanupGameObjects()
if (rewardBeam &&
rewardBeam->IsInWorld())
{
rewardBeam->DespawnOrUnsummon();
rewardBeam->Delete();
rewardBeam = nullptr;
}

Expand Down

0 comments on commit 40afbfc

Please sign in to comment.