Closed homosapine closed 4 years ago
I actually thought of just disabling checkpoints after I made this, and I think that's a good idea because personal spawns exist anyway, so checkpoints are redundant. But I don't think it would be hard to fix anyway.
Disabling checkpoints is fine short-term, but I'd like to to it within the add-on so hosts don't need to go through the ordeal of finding out they're broken. Furthermore, long-term I'd like to find a more elegant solution like detecting whether they're in jail.
Marked as critical as this allows players to bypass jail time.
I'll do this one tomorrow. I'll use the overwrite checkpoint package method.
Now fixed in 7bd016ab, see PR #14
I would suggest that the host disable checkpoints, however he may desire to keep them for some reason.
Checkpoint bricks store two points of data: %client.checkPointBrick %client.checkPointBrickPos
%client.checkPointBrick is used in GameConnection::getSpawnPoint(%client) %client.checkPointBrickPos is used in Gameconnection::applyPersistence(%client, %gotPlayer, %gotCamera) to attempt to recover a player's checkpoint brick.
The code affecting our situation is here near line 74 of Brick_Checkpoint/server.cs
There are a few ways to deal with this. We could clear the two saved values when a player get's jailed, however we may be screwing with their progress through, idk, a player made challenge? Or we could disable CheckPointPackage and write checkpoints into the current spawn point heirarchy. We would also need to copy over GameConnection::applyPersistence.