summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2024-01-16 16:37:50 -0500
committerJonathan Bradley <jcb@pikum.xyz>2024-01-16 16:37:50 -0500
commit595ca439df5c17ce402fccecf257b5fff9ef0ad0 (patch)
tree104910f07c948aca7486c5fb6d71ccbb6f806218 /src/game.cpp
parentca516153eab089eb7797f8b2b1f8a9e2f7801d6a (diff)
don't serialize a camera's CompInst to scene file
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 37109c5..5c43042 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -388,6 +388,17 @@ void Game_SaveSceneFile(const char *sceneFilePath) {
const auto &instance = instances[i];
if (instance.entHandle == EntityHandle_MAX)
continue;
+ /* 2024-01-16 - JCB - TODO Checking the GRBinds is currently
+ * set so that we don't serialize cameras. There's probably
+ * a better way to do this - or cameras should be refactored
+ * to rely on the instance position?
+ * I expect this to become an issue later, but I'm not aware
+ * of any use-cases at the moment. Leaving this as-is until
+ * we know what those use-cases are so we can write a valid
+ * story to handle the task.
+ */
+ if (instance.grBindsHandle == GrBindsHandle_MAX)
+ continue;
stream << PKE_FILE_OBJ_INSTANCE << std::endl;
SerializeInstance(stream, instance);
stream << PKE_FILE_OBJ_END << std::endl;