Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Fix spawns teleport
Browse files Browse the repository at this point in the history
  • Loading branch information
marqdevx committed Mar 5, 2024
1 parent 4a96869 commit 881ef75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 881ef75

Please sign in to comment.