From 5ca94d90f868aa0d5bb86cbf284cc9e9bb3e2cf9 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 22 Oct 2013 12:31:27 +1100 Subject: [PATCH] Add func_breakable CSQC model linking again --- qcsrc/server/func_breakable.qc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 -- 2.39.2