Fix incorrect serialization of SendTeleport (#1121)

* Fix incorrect serialization of SendTeleport

- Fixes all incorrect teleports in the game
- remove hacks in mast teleport
- ...
- ......

Update GameMessages.cpp

* Remove stupid argument

there got it all out

* remove extra true
This commit is contained in:
David Markowitz
2023-06-18 00:00:36 -07:00
committed by GitHub
parent f46bc33dd4
commit 2d31b7e4bb
4 changed files with 7 additions and 19 deletions

View File

@@ -124,8 +124,7 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player,
// Make sure the player is at the correct position.
GameMessages::SendTeleport(player->GetObjectID(), startPosition,
startRotation, player->GetSystemAddress(), true,
true);
startRotation, player->GetSystemAddress(), true);
// Spawn the vehicle entity.
@@ -243,11 +242,9 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player,
// Make sure everything has the correct position.
GameMessages::SendTeleport(player->GetObjectID(), startPosition,
startRotation, player->GetSystemAddress(), true,
true);
startRotation, player->GetSystemAddress(), true);
GameMessages::SendTeleport(carEntity->GetObjectID(), startPosition,
startRotation, player->GetSystemAddress(), true,
true);
startRotation, player->GetSystemAddress(), true);
}
void RacingControlComponent::OnRacingClientReady(Entity* player) {
@@ -634,7 +631,7 @@ void RacingControlComponent::Update(float deltaTime) {
GameMessages::SendTeleport(
player.playerID, player.respawnPosition,
player.respawnRotation,
playerEntity->GetSystemAddress(), true, true);
playerEntity->GetSystemAddress(), true);
vehicle->SetPosition(player.respawnPosition);
vehicle->SetRotation(player.respawnRotation);