Open QuiCM opened 4 years ago
This problem is still happening in the most recent commit 1eeb77d , The reproduction steps are:
Optional steps:
Note: No plugins, only SSC built-in enable.
I can confirm this issue is still happening in SSC, albeit with a minor functional improvement.
Yes, the right-click remove spawn point function is still broken. Has been even after the patch. (Though I suspect it's because the 'fix' was only to check if the bed still exists or not and not if the right-click to remove spawn action was completed or not. I'm beginning to suspect that this is a client side authoritative issue, and that without a special 'packet' or dedicated way to detect/track if this right-click action was completed legitimately, this 'SSC' loop-hole will continue to exist in eventually three states: either trust the client, disable/limit the functionality, or some sort of 'hack' using the warp system. Possible thing to ask the original game devs to improve/assist on?)
The 'improvement' is basically as mentioned above by @iFocsy, if you remove the bed regardless of whether or not you've right-clicked on the bed, you will get teleported back to spawn. However, if the bed is placed back in it's location, you will get teleported back. This occurs regardless of logging out, restarting the server, etc. Short of manually editing the spawnX
, spawnY
of the player back to -1
during server downtime, the spawn location essentially persists.
https://github.com/Pryaxis/TShock/discussions/1845 also has people discussing this issue (throwing here to keep note)
@sk9c00 can you test on this build? https://github.com/Pryaxis/TShock/actions/runs/117511286
Just tested the build 814801d. Bed function should be fixed?
Set → Teleport: As Expected (To Bed)
Set → Unset → Teleport: As Expected (To Spawn)
Set → Logout → Login → Teleport: Unsure of Actual Behaviour (To Spawn?)
Set → Destroy Bed → Teleport: As Expected (To Spawn)
Set → Destroy Bed → Set New → Teleport: As Expected (To Bed)
Set → Destroy Bed → Server Restart/Re-login → Teleport: As Expected (To Spawn)
Set → Destroy Bed → Place Back Bed → Teleport: As Expected (To Spawn)
Set → Destroy Bed → Place Back Bed → Re-login → Teleport: As Expected (To Spawn)
Set → Destroy Bed → Re-login → Place Back Bed → Teleport: As Expected (To Spawn)
Set → Set Another → Teleport: As Expected (To Second Bed)
Set → Set Another → Unset Another → Teleport: As Expected (To Spawn)
Set → Set Another → Destroy Another → Teleport: As Expected (To Spawn)
Set → Set Another → Remove First → Teleport: As Expected (To Second Bed)
Database Quirk
Any action to unset the bed whether through right click unset, or to destroy the bed will not update the external SQL database (unsure about SQLite) to -1, -1
, even after character update interval or server restart. The only time SpawnX, SpawnY
is updated is when character update interval is triggered with a new spawn set. However, this new spawn location doesn't persist after any re-logins or server restarts.
Another thing of note is that according to the wiki:
If the bed is removed, or if the criteria for the bed to function properly are no longer met, the player's spawn point will revert to the world default. If the bed is removed and replaced in the same location it will still act as the spawn point, as long as it still meets the criteria mentioned.
Its seems that the status of bed set/unset cannot be saved correctly.
BTW, tried with tshock.ignore.ssc(*)
and without.
This still exists. Rewritten SSC may help in diagnosing/fixing as the spawn code won't be lumped in all over the place
Copy/pasted straight from https://github.com/Pryaxis/TShock/discussions/1845:
How it should work:
When you use Magic Mirror it teleports you back to spawn. How it does work:
What I expected to happen: