[Needs replicating] Respawning bug

Bug report by nxy (forum topic #3106)
Issue #977
IssueRespawning bug
DescriptionThe player is respawning when you're a cop and you found the 3rd clue you're gonna respawn.
Script areaTreasure Hunt
PriorityMedium
Logged byXomoX
Assigned toMike
StatusInvestigating
CommentsI need to test this.

Before the third clue camera is shown, it saves your location, angle etc. as 'RespawnData'. When a player spawns, the first thing that is checked when determining where to spawn the player is if they have RespawnData saved. If so, it will spawn them there. Not sure if RespawnData gets cleared or not loaded correctly. Will run some tests.

Please help me out by telling me what the top two settings in /settings -> 'Gameplay settings' are set to (Initial spawn location and Respawn location).

The only thing I can see from the script is if you died, you'll respawn at whatever your 'Respawn location' is set to. Clearly somehow you died and never respawned or something.

Is this something you are able to replicate?

The only situation I can think of where you die and then don't respawn properly is after a city change. That's possibly what causes this 'dead but not dying' thing. Just tested it, nope. It makes the entire city transition be hidden behind a black screen, but that's not related to this issue.

Also, calling your personal vehicle at that time has no effect on your respawn. It thinks you died, and respawns you at hospital or job spawn.
ill try to replicate it on a video and post it here
Yes, get a video please
Mike after many failed attempts, here is how i replicated this issue. I joined the game and the treasure hunt was active in LV. After thinking about what you said about the dead state and respawn data during the 3rd clue hint, i decided to set my player to respawn after the next death, then went on duty as a mechanic after finding the first clue as civilian, proceeded to find the 2nd clue, the results you can see for yourself. I believe your theory to the problem is correct 🙂  Thanks, C_M

https://youtu.be/rZLlmJ4vvO4
If that so there is no fix for this issue right here, because the F4 function is built into the game. Basically when you're in the spectating mode you're qualified dead. it should respawn you to your last location however When you Requested a Class selection the script will automatically spawn you. Because you didn't bought a skin change ofc. So thats why its respawning you to another place.
Although after some 2 minutes thinking it can be fixed. OnPlayerRequestClass. You can see if the player is from Spectating the last clue
"Probably a variable" And on that you can easily spawn that player from a his last location. or from the OnPlayerSpawn.