]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
Merge branch 'divVerent/ru'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index 86763c78a7c50e69c29aa4c99d21372252092043..5a162742387c471883838d67a24a478e21357786 100644 (file)
@@ -140,14 +140,13 @@ void CopyBody_Think(void)
        CSQCMODEL_AUTOUPDATE();
        self.nextthink = time;
 }
-entity CopyBody(float keepvelocity)
+void CopyBody(float keepvelocity)
 {
-       entity ret;
        entity oldself;
        if (self.effects & EF_NODRAW)
-               return world;
+               return;
        oldself = self;
-       ret = self = spawn();
+       self = spawn();
        self.enemy = oldself;
        self.lip = oldself.lip;
        self.colormap = oldself.colormap;
@@ -199,7 +198,8 @@ entity CopyBody(float keepvelocity)
 
        Drag_MoveDrag(oldself, self);
 
-       self.owner = oldself;
+       if(self.colormap <= maxclients && self.colormap > 0)
+               self.colormap = 1024 + oldself.clientcolors;
 
        CSQCMODEL_AUTOINIT();
        self.CopyBody_nextthink = oldself.nextthink;
@@ -208,8 +208,6 @@ entity CopyBody(float keepvelocity)
        self.think = CopyBody_Think;
 
        self = oldself;
-
-       return ret;
 }
 
 float player_getspecies()
@@ -437,7 +435,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
        float valid_damage_for_weaponstats;
        float excess;
 
-       if((g_arena && numspawned < 2) || (g_ca && !ca_teams_ok) && !inWarmupStage)
+       if((g_arena && numspawned < 2) || (g_ca && allowed_to_spawn) && !inWarmupStage)
                return;
 
        dh = max(self.health, 0);
@@ -704,8 +702,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)