]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't persist attached objects for now. They would only be spawned at origin '0 0...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 28 Oct 2011 13:05:58 +0000 (16:05 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 28 Oct 2011 13:05:58 +0000 (16:05 +0300)
qcsrc/server/mutators/sandbox.qc

index dfd6059470ee1cba249e715e9341519508717514..3e22c3adf36ff2e757971707a8567961fc74ef5f 100644 (file)
@@ -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"));
        }