]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
Merge remote-tracking branch 'origin/master' into tzork/gm_nexball
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index 4ed480f9df9ed9befff5d445a688561c990fe142..54cd85ba555cc4bcbd93e0f503c46682df4ad3c9 100644 (file)
@@ -124,6 +124,22 @@ void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot)
 .entity pusher;
 .float pushltime;
 
+.float CopyBody_nextthink;
+.void(void) CopyBody_think;
+void CopyBody_Think(void)
+{
+       if(self.CopyBody_nextthink && time > self.CopyBody_nextthink)
+       {
+               self.CopyBody_think();
+               if(wasfreed(self))
+                       return;
+               self.CopyBody_nextthink = self.nextthink;
+               self.CopyBody_think = self.think;
+               self.think = CopyBody_Think;
+       }
+       CSQCMODEL_AUTOUPDATE();
+       self.nextthink = time;
+}
 void CopyBody(float keepvelocity)
 {
        entity oldself;
@@ -161,11 +177,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 +200,10 @@ void CopyBody(float keepvelocity)
                self.colormap = 1024 + self.clientcolors;
 
        CSQCMODEL_AUTOINIT();
+       self.CopyBody_nextthink = oldself.nextthink;
+       self.CopyBody_think = oldself.think;
+       self.nextthink = time;
+       self.think = CopyBody_Think;
 
        self = oldself;
 }
@@ -693,8 +711,6 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                        else
                                DropFlag(self.flagcarried, world, attacker);
                }
-               if(self.ballcarried && g_nexball)
-                       DropBall(self.ballcarried, self.origin, self.velocity);
                Portal_ClearAllLater(self);
 
                if(clienttype(self) == CLIENTTYPE_REAL)