Merge branch 'master' into Mario/turrets
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index d170cf4..aab2f9c 100644 (file)
@@ -18,7 +18,8 @@
     #include "../common/notifications.qh"
     #include "../common/deathtypes.qh"
     #include "mutators/mutators_include.qh"
-    #include "tturrets/include/turrets_early.qh"
+    #include "../common/turrets/turrets.qh"
+    #include "../common/turrets/sv_turrets.qh"
     #include "vehicles/vehicles_def.qh"
     #include "../csqcmodellib/sv_model.qh"
     #include "../common/playerstats.qh"
@@ -865,7 +866,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        else
                                victim = targ;
 
-                       if(IS_PLAYER(victim) || (victim.turrcaps_flags & TFL_TURRCAPS_ISTURRET) || (victim.flags & FL_MONSTER))
+                       if(IS_PLAYER(victim) || ((victim.turret_flags & TUR_FLAG_ISTURRET) && victim.active == ACTIVE_ACTIVE) || (victim.flags & FL_MONSTER))
                        {
                                if(DIFF_TEAM(victim, attacker) && !victim.frozen)
                                {