From 50af8d5b86d640830e909a79768b480b6dbbdd09 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Fri, 28 Oct 2011 16:05:58 +0300 Subject: [PATCH] Don't persist attached objects for now. They would only be spawned at origin '0 0 0' and wouldn't work. We must find some way to fix this eventually! --- qcsrc/server/mutators/sandbox.qc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index dfd605947..3e22c3adf 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -211,6 +211,12 @@ void sandbox_Storage_DatabaseSave() fh = fopen(fn, FILE_WRITE); for(head = world; (head = find(head, classname, "object")); ) { + // Unfortunately, attached objects cannot be persisted yet. That's because the parent is specified as an entity, + // but only properties can be saved to this file, leaving no way to identify the owner once all objects are spawned + // TODO: Find some way to fix this! + if(head.owner != world) + continue; + // a line with the properties of each file fputs(fh, strcat(sandbox_Storage_Save(head, TRUE), "\n")); } -- 2.39.2