]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/damage.qc
Merge branch 'terencehill/scoreboard_ui' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / damage.qc
index db9ddd0d9bd70c35034c7b933816561e330d63fd..3cbc07c57d3dddb989bd6b954ad58df86e6186f0 100644 (file)
@@ -629,14 +629,9 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de
                if(IS_PLAYER(attacker))
                {
                        // avoid dealing damage or force to other independent players
-                       if(IS_PLAYER(targ) && targ != attacker && (IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(targ)))
-                       {
-                               damage = 0;
-                               force = '0 0 0';
-                       }
-                       // avoid dealing damage or force to things owned by other independent players
-                       if(targ.realowner)
-                       if(IS_INDEPENDENT_PLAYER(targ.realowner) && attacker != targ.realowner)
+                       // and avoid dealing damage or force to things owned by other independent players
+                       if((IS_PLAYER(targ) && targ != attacker && (IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(targ))) ||
+                               (targ.realowner && IS_INDEPENDENT_PLAYER(targ.realowner) && attacker != targ.realowner))
                        {
                                damage = 0;
                                force = '0 0 0';