]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Adapt bounding box size to model size
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 25 Oct 2011 22:08:08 +0000 (01:08 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 25 Oct 2011 22:08:08 +0000 (01:08 +0300)
qcsrc/server/mutators/sandbox.qc

index 76a32f45a8b44eadf6a1aed263001fab46299bb8..b20b93824bd7ad78974e3bdef8767fe2c8c1f0b9 100644 (file)
@@ -177,7 +177,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                setmodel(e, argv(0));
                                e.skin = stof(argv(1));
                                e.frame = stof(argv(2));
-                               e.scale = stof(argv(3));
+                               e.scale = stof(argv(3));        setsize(e, e.mins * e.scale, e.maxs * e.scale); // adapt bounding box size to model size
                                e.movetype = stof(argv(4));
 
                                print_to(self, "Object pasted");
@@ -207,6 +207,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                                        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
                                                        break;
                                                case "physics":
                                                        switch(argv(3))