mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 18:13:52 +00:00
feat(editor): auto-save fires for any unsaved change (objects, NPCs, quests)
Auto-save was gated on terrainEditor.hasUnsavedChanges() so a session where the user only edited NPCs or quests would lose data on crash. Added autoSavePendingChanges_ flag flipped by every objectsDirty_ = true site (and markObjectsDirty), cleared by quickSave. Auto-save now fires on either dirty signal.
This commit is contained in:
parent
552e0d22e2
commit
2a2c217ae3
2 changed files with 31 additions and 24 deletions
|
|
@ -84,7 +84,7 @@ public:
|
|||
}
|
||||
mode_ = m;
|
||||
}
|
||||
void markObjectsDirty() { objectsDirty_ = true; }
|
||||
void markObjectsDirty() { objectsDirty_ = true; autoSavePendingChanges_ = true; }
|
||||
|
||||
void startGizmoMode(TransformMode mode);
|
||||
void setGizmoAxis(TransformAxis axis);
|
||||
|
|
@ -150,6 +150,7 @@ private:
|
|||
float autoSaveTimer_ = 0.0f;
|
||||
float autoSaveInterval_ = 300.0f;
|
||||
bool autoSaveEnabled_ = true;
|
||||
bool autoSavePendingChanges_ = false;
|
||||
bool showQuitConfirm_ = false;
|
||||
ZoneManifest zoneManifest_;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue