]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/sandbox.qc
Merge branch 'master' into Mario/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / sandbox.qc
index a077b213a00b6b60f21a7f7844273843ea7f626b..e84c6d696a91e691ccadabf6c68cd927febbc97f 100644 (file)
@@ -56,6 +56,8 @@ void sandbox_ObjectFunction_Think()
        }
 
        self.nextthink = time;
+       
+       CSQCMODEL_AUTOUPDATE();
 }
 
 .float old_solid, old_movetype;
@@ -137,7 +139,7 @@ entity sandbox_ObjectSpawn(float database)
 {
        // spawn a new object with default properties
 
-       entity e;
+       entity e, oldself;
        e = spawn();
        e.classname = "object";
        e.takedamage = DAMAGE_AIM;
@@ -172,6 +174,11 @@ entity sandbox_ObjectSpawn(float database)
                setorigin(e, trace_endpos);
                e.angles_y = self.v_angle_y;
        }
+       
+       oldself = self;
+       self = e;
+       CSQCMODEL_AUTOINIT();
+       self = oldself;
 
        object_count += 1;
        return e;