]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
proiperly fade corpses
authorRudolf Polzer <divverent@alientrap.org>
Sat, 24 Dec 2011 09:59:57 +0000 (10:59 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 24 Dec 2011 09:59:57 +0000 (10:59 +0100)
qcsrc/server/cl_player.qc

index 4d034510a99e4681ef2fc130dc0db53ff1278ba1..5b369c27c5e2eea45e4bccb73c2df778b11c72f4 100644 (file)
@@ -124,8 +124,19 @@ void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot)
 .entity pusher;
 .float pushltime;
 
 .entity pusher;
 .float pushltime;
 
+.float CopyBody_nextthink;
+.void(void) CopyBody_think;
 void CopyBody_Think(void)
 {
 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;
 }
        CSQCMODEL_AUTOUPDATE();
        self.nextthink = time;
 }
@@ -189,6 +200,8 @@ void CopyBody(float keepvelocity)
                self.colormap = 1024 + self.clientcolors;
 
        CSQCMODEL_AUTOINIT();
                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.nextthink = time;
        self.think = CopyBody_Think;