]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
ScoreRules_freezetag should know the number of available teams this way (like CA...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index aa6258468b05a78ab157949a3cd0049c96422ba4..68a2de343901fba60b3c926e7a9a42121cc68e69 100644 (file)
@@ -262,10 +262,6 @@ void player_anim (void)
 
 void SpawnThrownWeapon (vector org, float w)
 {
-       if(g_minstagib)
-       if(self.ammo_cells <= 0)
-               return;
-
        if(g_pinata)
        {
                float j;
@@ -278,8 +274,9 @@ void SpawnThrownWeapon (vector org, float w)
        }
        else
        {
-               if(W_IsWeaponThrowable(self.weapon))
-                       W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
+               if(WEPSET_CONTAINS_EW(self, self.weapon))
+                       if(W_IsWeaponThrowable(self.weapon))
+                               W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
        }
 }
 
@@ -387,17 +384,10 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
        else
                Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker);
 
-       if (!g_minstagib)
-       {
-               v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
-               take = v_x;
-               save = v_y;
-       }
-       else
-       {
-               save = 0;
-               take = damage;
-       }
+
+       v = healtharmor_applydamage(self.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+       take = v_x;
+       save = v_y;
 
        if(attacker == self)
        {
@@ -426,6 +416,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
        frag_inflictor = inflictor;
        frag_attacker = attacker;
        frag_target = self;
+       frag_damage = damage;
        damage_take = take;
        damage_save = save;
        damage_force = force;
@@ -508,7 +499,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
        self.dmg_inflictor = inflictor;
 
        if(g_ca && self != attacker && IS_PLAYER(attacker))
-               PlayerScore_Add(attacker, SP_SCORE, (damage - excess) * autocvar_g_ca_damage2score_multiplier);
+               PlayerTeamScore_Add(attacker, SP_SCORE, ST_SCORE, (damage - excess) * autocvar_g_ca_damage2score_multiplier);
 
        float abot, vbot, awep;
        abot = (IS_BOT_CLIENT(attacker));
@@ -664,7 +655,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                else
                        self.respawn_countdown = -1; // do not count down
 
-               if(g_lms || g_cts || autocvar_g_forced_respawn)
+               if(g_cts || autocvar_g_forced_respawn)
                        self.respawn_flags = self.respawn_flags | RESPAWN_FORCE;
 
                self.death_time = time;