From 881ef7555cb0dc78d95e44cd080fdb93a9e92d28 Mon Sep 17 00:00:00 2001 From: marqdevx Date: Tue, 5 Mar 2024 14:52:38 +0100 Subject: [PATCH] Fix spawns teleport --- src/commands.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands.cpp b/src/commands.cpp index 3de3f746..65cea991 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -560,8 +560,9 @@ CON_COMMAND_CHAT(spawn, "teleport to desired spawn") } int totalSpawns = spawns.Count(); - - pPawn->SetAbsOrigin(spawnpos); + + //ClientPrint(player, HUD_PRINTTALK, "Spawn: %f / %f / %f", spawnpos.x, spawnpos.y, spawnpos.z); + player->GetPawn()->Teleport(&spawnpos, nullptr, nullptr); ClientPrint(player, HUD_PRINTTALK, CHAT_PREFIX"You have been teleported to spawn. %i/%i", spawnIndex +1, totalSpawns); }