1. Sorry if this issue has been addressed on these forums in the past. I have just recently gotten back into rust plugin development, after a year, I had gone back to some of my old code for enabling a death-match and have found some issues that I'd like to resolve.

    I have a death match plugin that allows the admin to set several spawn points, hopefully within a certain area, maybe walled off or something like that. Once set up, users can send a command to join the session. They are stripped of any items/clothing/etc. then equipped with a set up weaponry to the battle. When the user dies, as usual they can choose to spawn in one of their bags/bed or on the beach, regardless, unless the user has quit the add-in, he's teleported to one of the spawn points.

    This is where I need help, once the user is moved they cannot see the world around them, buildings load/render in slowly and they see all of the dead bodies around them fall as though they all just died. The bodies don't bother me as much as the buildings, you start to run but can't because there's a wall in front of you that you didn't see a second ago.

    I assume it's because the 'scene' has to load/render. I also assume it's because when the user initially chose to re-spawn somewhere (in one of his bags for example) the game loaded THAT scene, and I teleported them to the death-match scene and there was no time to load. I tried ensuring they were 'asleep' after the re-spawn but that didn't work as well as I hoped.

    TLDR;

    How does one teleport a player programmatically to a location but have THAT location loaded/rendered so they don't see the weirdness (as described above)?

    I also like to know how to remove dead bodies.. the flies.. the flies are horrible.
     
  2. Wulf

    Wulf Community Admin

    Look at how N-Teleportation or m-Teleportation did/do it, basically respawning the player so it shows the respawn screen and such.