mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 17:54:01 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user