mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-14 12:18:22 +00:00
remove player cast
This commit is contained in:
parent
f4a6086e4c
commit
87d5bd0229
@ -453,15 +453,10 @@ void SGCannon::SpawnNewModel(Entity* self) {
|
|||||||
|
|
||||||
void SGCannon::RemovePlayer(LWOOBJID playerID) {
|
void SGCannon::RemovePlayer(LWOOBJID playerID) {
|
||||||
auto* player = Game::entityManager->GetEntity(playerID);
|
auto* player = Game::entityManager->GetEntity(playerID);
|
||||||
if (player == nullptr)
|
if (!player) return;
|
||||||
return;
|
|
||||||
|
|
||||||
auto* playerObject = dynamic_cast<Player*>(player);
|
auto* character = player->GetCharacter();
|
||||||
if (playerObject == nullptr)
|
auto* characterComponent = player->GetComponent<CharacterComponent>();
|
||||||
return;
|
|
||||||
|
|
||||||
auto* character = playerObject->GetCharacter();
|
|
||||||
auto* characterComponent = playerObject->GetComponent<CharacterComponent>();
|
|
||||||
if (characterComponent && character) {
|
if (characterComponent && character) {
|
||||||
characterComponent->SendToZone(character->GetLastNonInstanceZoneID());
|
characterComponent->SendToZone(character->GetLastNonInstanceZoneID());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user