mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 14:58:27 +00:00
move IsDead to the DestroyableComponent
This commit is contained in:
@@ -16,7 +16,7 @@ void BaseEnemyApe::OnStartup(Entity* self) {
|
||||
|
||||
void BaseEnemyApe::OnDie(Entity* self, Entity* killer) {
|
||||
auto* anchor = Game::entityManager->GetEntity(self->GetVar<LWOOBJID>(u"QB"));
|
||||
if (anchor != nullptr && !anchor->GetIsDead()) {
|
||||
if (anchor != nullptr && !anchor->GetComponent<DestroyableComponent>()->GetIsDead()) {
|
||||
anchor->Smash(self->GetObjectID(), eKillType::SILENT);
|
||||
}
|
||||
}
|
||||
|
@@ -152,13 +152,13 @@ void AmSkullkinDrill::FreezePlayer(Entity* self, Entity* player, bool bFreeze) {
|
||||
auto StateChangeType = eStateChangeType::POP;
|
||||
|
||||
if (bFreeze) {
|
||||
if (player->GetIsDead()) {
|
||||
if (player->GetComponent<DestroyableComponent>()->GetIsDead()) {
|
||||
return;
|
||||
}
|
||||
|
||||
StateChangeType = eStateChangeType::PUSH;
|
||||
} else {
|
||||
if (player->GetIsDead()) {
|
||||
if (player->GetComponent<DestroyableComponent>()->GetIsDead()) {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ void AgSurvivalBuffStation::OnTimerDone(Entity* self, std::string timerName) {
|
||||
auto team = self->GetVar<std::vector<LWOOBJID>>(u"BuilderTeam");
|
||||
for (auto memberID : team) {
|
||||
auto member = Game::entityManager->GetEntity(memberID);
|
||||
if (member != nullptr && !member->GetIsDead()) {
|
||||
if (member != nullptr && !member->GetComponent<DestroyableComponent>()->GetIsDead()) {
|
||||
GameMessages::SendDropClientLoot(member, self->GetObjectID(), powerupToDrop, 0, self->GetPosition());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user