]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Increase / decrease the object count of the owner, not of the person spawning / remov...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 27 Oct 2011 17:07:26 +0000 (20:07 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 27 Oct 2011 17:07:26 +0000 (20:07 +0300)
qcsrc/server/mutators/sandbox.qc

index 6a9a7ed5869c1774c486a7dbad13467429eb3db3..b21a1d6aeca74b63e21e616c9c89260e7dc63064 100644 (file)
@@ -137,17 +137,17 @@ entity sandbox_SpawnObject()
        setorigin(e, trace_endpos);
        e.angles_y = self.v_angle_y;
 
-       self.object_count += 1;
+       e.realowner.object_count += 1;
 
        return e;
 }
 
 void sandbox_RemoveObject(entity e)
 {
+       e.realowner.object_count -= 1;
+
        remove(e);
        e = world;
-
-       self.object_count -= 1;
 }
 
 string sandbox_Storage_Save(entity e)