BUG: Getting kicked/disconnected while in Brick-By-Brick building mode causes the currently selected model to be wiped #1632
Labels
B-Properties
Issues related to properties
P-Blocked
This issue will not be worked on until a blocking issue is resolved
Make sure you've done the following:
I have checked that this issue has not already been reported.
I have validated that this issue is not a syntax error of either MySQL or SQLite.
I have pulled the latest version of the main branch of DarkflameServer and have confirmed that the issue exists there.
DarkflameServer Version
aaf446f
Issue Description
If the player is disconnected from the server (sent to login screen or upon crashing), the model that was currently being edited in Brick-By-Brick building is wiped.
Looking through the code, it seems like the regardless of how the player leave the Brick-By-Brick building state, the server attempts to save the model data, but since disconnecting doesn't send any model data, it saves the model as empty, effectively clearing everything.
This only effects the currently edited model. Models already placed down and/or built on properties remain.
While there is no Issues regarding the following, it could also be considered a fix for this Issue: Player is AFK kicked while in Brick-By-Brick building -- I have not found any evidence from live for player's not getting AFK kicked while in Brick-By-Brick building.
Either disabling the AFK timer while the player is building or checking the way in which the player disconnected from the property and saving accordingly would seem like the solutions. Having both seems optimal.
Reproduction Steps
Expected Behavior
Again, I don't have evidence from live, but I would assume that models should just roll back to the previously saved version, or players shouldn't be kicked while building.
Environment
Ubuntu
The text was updated successfully, but these errors were encountered: