]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Merge remote branch 'origin/samual/hitindication'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index d809f3534ed89076843975f0c64874a7a4603403..d27c31a6aafec21f2fe5ee23e5eaf14488573d2a 100644 (file)
@@ -201,6 +201,8 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                        {
                                if(!lms_next_place)
                                        lms_next_place = player_count;
+                               else
+                                       lms_next_place = min(lms_next_place, player_count);
                                PlayerScore_Add(targ, SP_LMS_RANK, lms_next_place); // won't ever spawn again
                                --lms_next_place;
                        }
@@ -787,15 +789,15 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                {
                                        if(damage > 0)
                                        {
-                                               if(attacker.weapon != WEP_LASER
-                                               && (attacker.weapon != WEP_ELECTRO || !autocvar_g_balance_electro_lightning)
-                                               && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+                                               if(deathtype != DEATH_FIRE)
+                                               if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
                                                {
                                                        if(targ.BUTTON_CHAT)
                                                                attacker.typehitsound += 1;
                                                        else
                                                                attacker.hitsound += 1;
                                                        attacker.prevhitsound = time;
+                                                       attacker.hit_time = time;
                                                }
 
                                                damage_goodhits += 1;
@@ -820,8 +822,8 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                }
                                else
                                {
-                                       if(deathtype != DEATH_FIRE
-                                       && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+                                       if(deathtype != DEATH_FIRE)
+                                       if(attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
                                        {
                                                attacker.typehitsound += 1;
                                                attacker.prevhitsound = time;