Possessor and possessable additions (#619)

* possessor-fixup and possessable additions

* comment and docstring fixes

* fix possessable initialization

* split animation flags into it's own header
remove unnecessary checks
This commit is contained in:
Aaron Kimbrell
2022-07-08 22:25:15 -05:00
committed by GitHub
parent 22b2516107
commit 3865a186a7
8 changed files with 178 additions and 89 deletions

View File

@@ -95,14 +95,6 @@ void SGCannon::OnActivityStateChangeRequest(Entity *self, LWOOBJID senderID, int
Game::logger->Log("SGCannon", "Shooting gallery component is null\n");
}
auto* possessorComponent = player->GetComponent<PossessorComponent>();
/*if (possessorComponent != nullptr) {
possessorComponent->SetPossessable(self->GetObjectID());
EntityManager::Instance()->SerializeEntity(player);
}*/
auto* characterComponent = player->GetComponent<CharacterComponent>();
if (characterComponent != nullptr) {
@@ -111,7 +103,7 @@ void SGCannon::OnActivityStateChangeRequest(Entity *self, LWOOBJID senderID, int
auto possessor = player->GetComponent<PossessorComponent>();
if(possessor) {
possessor->SetPossessable(self->GetObjectID());
possessor->SetPossessableType(0);
possessor->SetPossessableType(ePossessionType::NO_POSSESSION);
}
EntityManager::Instance()->SerializeEntity(player);