From 595ca439df5c17ce402fccecf257b5fff9ef0ad0 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 16 Jan 2024 16:37:50 -0500 Subject: don't serialize a camera's CompInst to scene file --- src/game.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/game.cpp') 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; -- cgit v1.2.3