darkfo icon indicating copy to clipboard operation
darkfo copied to clipboard

Properly serialize player/party

Open darkf opened this issue 7 years ago • 0 comments

When loading a savegame, the player and the party should be placed on the newly loaded map with the appropriate state.

At the moment this is done by yanking the player out of the map when serializing, and just overwriting the position/orientation properties when deserializing (keeping the player separate in the save data).

This might be ineffectual or inefficient, and instead we could support (de)serialization on the Player object and leave it inside the map, and then reset the global player reference to it on load.

(This would work even better if we get rid of the player reference entirely, TBH.)

darkf avatar Feb 04 '17 05:02 darkf