From: Mario Date: Tue, 22 Oct 2013 01:31:27 +0000 (+1100) Subject: Add func_breakable CSQC model linking again X-Git-Tag: xonotic-v0.8.0~257^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5ca94d90f868aa0d5bb86cbf284cc9e9bb3e2cf9;p=xonotic%2Fxonotic-data.pk3dir.git Add func_breakable CSQC model linking again --- diff --git a/qcsrc/server/func_breakable.qc b/qcsrc/server/func_breakable.qc index ca7c891bf..8db84027e 100644 --- a/qcsrc/server/func_breakable.qc +++ b/qcsrc/server/func_breakable.qc @@ -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