From: Mircea Kitsune Date: Fri, 28 Oct 2011 13:05:58 +0000 (+0300) Subject: Don't persist attached objects for now. They would only be spawned at origin '0 0... X-Git-Tag: xonotic-v0.6.0~35^2~18^2~85 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=50af8d5b86d640830e909a79768b480b6dbbdd09;p=xonotic%2Fxonotic-data.pk3dir.git 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! --- 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")); }