]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add func_breakable CSQC model linking again
authorMario <mario.mario@y7mail.com>
Tue, 22 Oct 2013 01:31:27 +0000 (12:31 +1100)
committerMario <mario.mario@y7mail.com>
Tue, 22 Oct 2013 01:31:27 +0000 (12:31 +1100)
qcsrc/server/func_breakable.qc

index ca7c891bfe1ec590fd397f1f03aa2591947ba283..8db84027e13e41170d460c70cb489f409d51e458 100644 (file)
@@ -79,6 +79,8 @@ void func_breakable_colormod()
                self.colormod = '1 0 0' + '0 1 0' * (2 * h - 0.5);
        else
                self.colormod = '1 1 1';
+               
+       CSQCMODEL_AUTOUPDATE();
 }
 
 void func_breakable_look_destroyed()
@@ -140,12 +142,16 @@ void func_breakable_destroyed()
 {
        func_breakable_look_destroyed();
        func_breakable_behave_destroyed();
+       
+       CSQCMODEL_AUTOUPDATE();
 }
 
 void func_breakable_restore()
 {
        func_breakable_look_restore();
        func_breakable_behave_restore();
+       
+       CSQCMODEL_AUTOUPDATE();
 }
 
 vector debrisforce; // global, set before calling this
@@ -212,13 +218,13 @@ void func_breakable_damage(entity inflictor, entity attacker, float damage, floa
 void func_breakable_reset()
 {
        self.team = self.team_saved;
-       self.think = func_null;
-       self.nextthink = 0;
        func_breakable_look_restore();
        if(self.spawnflags & 1)
                func_breakable_behave_destroyed();
        else
                func_breakable_behave_restore();
+               
+       CSQCMODEL_AUTOUPDATE();
 }
 
 // destructible walls that can be used to trigger target_objective_decrease
@@ -270,6 +276,8 @@ void spawnfunc_func_breakable() {
 
        self.reset = func_breakable_reset;
        func_breakable_reset();
+       
+       CSQCMODEL_AUTOINIT();
 }
 
 // for use in maps with a "model" key set