]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Merge branch 'master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index b9d2ab9aae78052befe77b1cbfd31e56d78e37e1..6f0b0e439395af19a78958908d26a636d5ec2a03 100644 (file)
@@ -311,11 +311,11 @@ float Obituary_WeaponDeath(
                }
                else
                {
-                       dprint(sprintf(
+                       dprintf(
                                "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %d!\n",
                                deathtype,
                                death_weapon
-                       ));
+                       );
                }
 
                return TRUE;
@@ -683,7 +683,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                frag_target = targ;
                frag_damage = damage;
                frag_force = force;
-        frag_deathtype = deathtype;
+               frag_deathtype = deathtype;
                frag_mirrordamage = mirrordamage;
                MUTATOR_CALLHOOK(PlayerDamage_Calculate);
                damage = frag_damage;
@@ -732,7 +732,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)
+                       if(IS_PLAYER(victim) || victim.turrcaps_flags & TFL_TURRCAPS_ISTURRET || victim.flags & FL_MONSTER)
                        {
                                if(DIFF_TEAM(victim, attacker))
                                {
@@ -923,12 +923,14 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                mininv_f = (vlen(force) * (1-tfloorforce)) / autocvar_g_throughfloor_force_max_stddev;
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       print(sprintf("THROUGHFLOOR: D=%f F=%f max(dD)=1/%f max(dF)=1/%f", finaldmg, vlen(force), mininv_d, mininv_f));
+                                                       printf("THROUGHFLOOR: D=%f F=%f max(dD)=1/%f max(dF)=1/%f", finaldmg, vlen(force), mininv_d, mininv_f);
+
 
                                                total = 0.25 * pow(max(mininv_f, mininv_d), 2);
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       print(sprintf(" steps=%f", total));
+                                                       printf(" steps=%f", total);
+
 
                                                if (IS_PLAYER(targ))
                                                        total = ceil(bound(autocvar_g_throughfloor_min_steps_player, total, autocvar_g_throughfloor_max_steps_player));
@@ -936,7 +938,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                        total = ceil(bound(autocvar_g_throughfloor_min_steps_other, total, autocvar_g_throughfloor_max_steps_other));
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       print(sprintf(" steps=%f dD=%f dF=%f", total, finaldmg * (1-tfloordmg) / (2 * sqrt(total)), vlen(force) * (1-tfloorforce) / (2 * sqrt(total))));
+                                                       printf(" steps=%f dD=%f dF=%f", total, finaldmg * (1-tfloordmg) / (2 * sqrt(total)), vlen(force) * (1-tfloorforce) / (2 * sqrt(total)));
 
                                                for(c = 0; c < total; ++c)
                                                {
@@ -963,7 +965,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                force = force * a;
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       print(sprintf(" D=%f F=%f\n", finaldmg, vlen(force)));
+                                                       printf(" D=%f F=%f\n", finaldmg, vlen(force));
                                        }
 
                                        //if (targ == attacker)
@@ -1175,6 +1177,7 @@ void Fire_ApplyDamage(entity e)
        e.fire_hitsound = TRUE;
 
        if (!IS_INDEPENDENT_PLAYER(e))
+       if(!e.freezetag_frozen)
        FOR_EACH_PLAYER(other) if(e != other)
        {
                if(IS_PLAYER(other))