From bd5ece69880b52958f63295510c3c505f163c9d9 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 22 Dec 2011 22:01:26 +0100 Subject: [PATCH] fix issues with CopyBody --- qcsrc/csqcmodellib/sv_model.qc | 1 + qcsrc/server/cl_player.qc | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qcsrc/csqcmodellib/sv_model.qc b/qcsrc/csqcmodellib/sv_model.qc index 1c214e0ab..3646370ce 100644 --- a/qcsrc/csqcmodellib/sv_model.qc +++ b/qcsrc/csqcmodellib/sv_model.qc @@ -110,6 +110,7 @@ void CSQCModel_LinkEntity() { self.SendEntity = CSQCModel_Send; self.SendFlags = 0xFFFFFF; + CSQCModel_CheckUpdate(); } void CSQCModel_UnlinkEntity() diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 4ed480f9d..4d034510a 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -124,6 +124,11 @@ void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot) .entity pusher; .float pushltime; +void CopyBody_Think(void) +{ + CSQCMODEL_AUTOUPDATE(); + self.nextthink = time; +} void CopyBody(float keepvelocity) { entity oldself; @@ -161,11 +166,9 @@ void CopyBody(float keepvelocity) self.skin = oldself.skin; self.species = oldself.species; self.movetype = oldself.movetype; - self.nextthink = oldself.nextthink; self.solid = oldself.solid; self.ballistics_density = oldself.ballistics_density; self.takedamage = oldself.takedamage; - self.think = oldself.think; self.customizeentityforclient = oldself.customizeentityforclient; self.uncustomizeentityforclient = oldself.uncustomizeentityforclient; self.uncustomizeentityforclient_set = oldself.uncustomizeentityforclient_set; @@ -186,6 +189,8 @@ void CopyBody(float keepvelocity) self.colormap = 1024 + self.clientcolors; CSQCMODEL_AUTOINIT(); + self.nextthink = time; + self.think = CopyBody_Think; self = oldself; } -- 2.39.2