From 4cf1a2a34fa7f2dfb0c0b943638df7ba66d70f83 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Thu, 27 Oct 2011 20:07:26 +0300 Subject: [PATCH] Increase / decrease the object count of the owner, not of the person spawning / removing objects. As later on, we might have support for removing objects using other means. --- qcsrc/server/mutators/sandbox.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 6a9a7ed58..b21a1d6ae 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -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) -- 2.39.2