From: Mircea Kitsune Date: Wed, 26 Oct 2011 11:04:31 +0000 (+0300) Subject: Don't multiply size with scale is scale is 0, causing the bounding box to become... X-Git-Tag: xonotic-v0.6.0~35^2~18^2~154 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ffcf6839cd3715f655fe2b7e0e0948cdcc752de2;p=xonotic%2Fxonotic-data.pk3dir.git Don't multiply size with scale is scale is 0, causing the bounding box to become 0 itself. This fixes the last known bug --- diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 08439ea7b..b1292263d 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -186,11 +186,9 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) e.colormod = stov(argv(3)); e.glowmod = stov(argv(4)); e.frame = stof(argv(5)); - e.scale = stof(argv(6)); setsize(e, e.mins * e.scale, e.maxs * e.scale); // adapt bounding box size to model size + e.scale = stof(argv(6)); if(self.scale) setsize(e, e.mins * e.scale, e.maxs * e.scale); // adapt bounding box size to model size e.movetype = stof(argv(7)); -dprint(strcat(argv(6), " --------\n")); - print_to(self, "Object pasted"); if(autocvar_g_sandbox_info) print(strcat(self.netname, " pasted an object at origin ", vtos(e.origin), "\n")); @@ -227,7 +225,8 @@ dprint(strcat(argv(6), " --------\n")); break; case "scale": e.scale = stof(argv(3)); - setsize(e, e.mins * e.scale, e.maxs * e.scale); // adapt bounding box size to model size + if(self.scale) + setsize(e, e.mins * e.scale, e.maxs * e.scale); // adapt bounding box size to model size break; case "physics": switch(argv(3))