]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
do not rewrite colormap on corpses (but do rewrite in CopyBody cheats)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index 49b52555f6ebb0734b8ee371a3b33f08b5cf8466..86763c78a7c50e69c29aa4c99d21372252092043 100644 (file)
@@ -140,13 +140,14 @@ void CopyBody_Think(void)
        CSQCMODEL_AUTOUPDATE();
        self.nextthink = time;
 }
-void CopyBody(float keepvelocity)
+entity CopyBody(float keepvelocity)
 {
+       entity ret;
        entity oldself;
        if (self.effects & EF_NODRAW)
-               return;
+               return world;
        oldself = self;
-       self = spawn();
+       ret = self = spawn();
        self.enemy = oldself;
        self.lip = oldself.lip;
        self.colormap = oldself.colormap;
@@ -200,9 +201,6 @@ void CopyBody(float keepvelocity)
 
        self.owner = oldself;
 
-       if(self.colormap <= maxclients && self.colormap > 0)
-               self.colormap = 1024 + oldself.clientcolors;
-
        CSQCMODEL_AUTOINIT();
        self.CopyBody_nextthink = oldself.nextthink;
        self.CopyBody_think = oldself.think;
@@ -210,6 +208,8 @@ void CopyBody(float keepvelocity)
        self.think = CopyBody_Think;
 
        self = oldself;
+
+       return ret;
 }
 
 float player_getspecies()