breakout possessor from char comp (#606)

* breakout possessor from char comp
Use the correct component for possessor
cleanup scirps that were using possessor improperly
beginnings of mounts

* fix comments
added bounds check
This commit is contained in:
Aaron Kimbrell
2022-06-29 18:50:24 -05:00
committed by GitHub
parent a55162775e
commit 1497d9b35a
9 changed files with 76 additions and 106 deletions

View File

@@ -107,9 +107,12 @@ void SGCannon::OnActivityStateChangeRequest(Entity *self, LWOOBJID senderID, int
if (characterComponent != nullptr) {
characterComponent->SetIsRacing(true);
characterComponent->SetVehicleObjectID(self->GetObjectID());
characterComponent->SetPossessableType(0);
characterComponent->SetCurrentActivity(2);
auto possessor = player->GetComponent<PossessorComponent>();
if(possessor) {
possessor->SetPossessable(self->GetObjectID());
possessor->SetPossessableType(0);
}
EntityManager::Instance()->SerializeEntity(player);
}