move IsDead to the DestroyableComponent

This commit is contained in:
jadebenn
2024-12-24 23:00:49 -06:00
parent 6ed6efa921
commit 81b4f84d03
17 changed files with 24 additions and 30 deletions

View File

@@ -160,7 +160,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
}
//Kill player if health == 0
if (entity->GetIsDead()) {
if (entity->GetComponent<DestroyableComponent>()->GetIsDead()) {
entity->Smash(entity->GetObjectID());
}