]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix issues with CopyBody
authorRudolf Polzer <divverent@alientrap.org>
Thu, 22 Dec 2011 21:01:26 +0000 (22:01 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 22 Dec 2011 21:01:26 +0000 (22:01 +0100)
qcsrc/csqcmodellib/sv_model.qc
qcsrc/server/cl_player.qc

index 1c214e0aba78780aabf153c2437966ca0c20b848..3646370cecbbbbdab491c4fc9afc86cc9701f500 100644 (file)
@@ -110,6 +110,7 @@ void CSQCModel_LinkEntity()
 {
        self.SendEntity = CSQCModel_Send;
        self.SendFlags = 0xFFFFFF;
+       CSQCModel_CheckUpdate();
 }
 
 void CSQCModel_UnlinkEntity()
index 4ed480f9df9ed9befff5d445a688561c990fe142..4d034510a99e4681ef2fc130dc0db53ff1278ba1 100644 (file)
@@ -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;
 }