mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-16 07:08:48 +00:00
fix: ape anchor not respawning (#1927)
* fix: ape anchor not respawning * add return Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -92,7 +92,7 @@ void BaseEnemyApe::OnTimerDone(Entity* self, std::string timerName) {
|
||||
new LDFData<LWOOBJID>(u"ape", self->GetObjectID())
|
||||
};
|
||||
|
||||
auto* anchor = Game::entityManager->CreateEntity(entityInfo);
|
||||
auto* anchor = Game::entityManager->CreateEntity(entityInfo, nullptr, self);
|
||||
Game::entityManager->ConstructEntity(anchor);
|
||||
self->SetVar<LWOOBJID>(u"QB", anchor->GetObjectID());
|
||||
|
||||
@@ -140,3 +140,9 @@ void BaseEnemyApe::StunApe(Entity* self, bool stunState) {
|
||||
self->SetBoolean(u"knockedOut", stunState);
|
||||
}
|
||||
}
|
||||
|
||||
void BaseEnemyApe::OnChildRemoved(Entity& self, GameMessages::ChildRemoved& childRemoved) {
|
||||
if (self.GetVar<LWOOBJID>(u"QB") == childRemoved.childID) {
|
||||
self.SetVar<LWOOBJID>(u"QB", LWOOBJID_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user