]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
also apply this (density) to clones
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index 6fee98bcd47dc7e34206fda85d626f2ae98c28ce..b3f0e3ee5aac7fd72f57ea2a4b9e3c5eb570519f 100644 (file)
@@ -142,6 +142,7 @@ void CopyBody(float keepvelocity)
        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;
@@ -165,14 +166,13 @@ void CopyBody(float keepvelocity)
 
 float player_getspecies()
 {
+       float s;
        get_model_parameters(self.playermodel, self.skinindex);
-       if(get_model_parameters_species >= 0)
-       {
-               get_model_parameters(string_null, 0);
-               return get_model_parameters_species;
-       }
+       s = get_model_parameters_species;
        get_model_parameters(string_null, 0);
-       return SPECIES_HUMAN;
+       if(s < 0)
+               return SPECIES_HUMAN;
+       return s;
 }
 
 void player_setupanimsformodel()
@@ -594,6 +594,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
 
                frag_attacker = attacker;
                frag_inflictor = inflictor;
+               frag_target = self;
                MUTATOR_CALLHOOK(PlayerDies);
 
                if(self.flagcarried)
@@ -621,6 +622,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                self.movetype = MOVETYPE_TOSS;
                // shootable corpse
                self.solid = SOLID_CORPSE;
+               self.ballistics_density = cvar("g_ballistics_density_corpse");
                // don't stick to the floor
                self.flags &~= FL_ONGROUND;
                // dying animation
@@ -1201,7 +1203,10 @@ void LoadPlayerSounds(string f, float first)
        var .string field;
        fh = fopen(f, FILE_READ);
        if(fh < 0)
+       {
+               dprint("Player sound file not found: ", f, "\n");
                return;
+       }
        while((s = fgets(fh)))
        {
                if(tokenize_console(s) != 3)