Merge branch 'master' into terencehill/bot_fixes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index 61fe6ef..45c6ba1 100644 (file)
@@ -6,9 +6,8 @@
 #include "scores.qh"
 #include "waypointsprites.qh"
 #include "spawnpoints.qh"
-#include "tturrets/include/turrets_early.qh"
 #include "t_items.qh"
-#include "../common/vehicles/sv_vehicles.qh"
+#include "../common/vehicles/all.qh"
 #include "weapons/accuracy.qh"
 #include "weapons/csqcprojectile.qh"
 #include "weapons/selection.qh"
@@ -850,7 +849,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                        else
                                victim = targ;
 
-                       if(IS_PLAYER(victim) || IS_TURRET(victim) || IS_MONSTER(victim))
+                       if(IS_PLAYER(victim) || (IS_TURRET(victim) && victim.active == ACTIVE_ACTIVE) || IS_MONSTER(victim) || MUTATOR_CALLHOOK(PlayHitsound, victim))
                        {
                                if(DIFF_TEAM(victim, attacker) && !victim.frozen)
                                {