freezetag: DEATH_HURTTRIGGER is still supposed to be lethal in any case
authorFruitieX <fruitiex@gmail.com>
Tue, 30 Nov 2010 16:28:14 +0000 (18:28 +0200)
committerFruitieX <fruitiex@gmail.com>
Tue, 30 Nov 2010 16:28:14 +0000 (18:28 +0200)
qcsrc/server/g_damage.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/gamemode_freezetag.qc

index b8c6d4c..fd5b445 100644 (file)
@@ -631,6 +631,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                frag_target = targ;
                frag_damage = damage;
                frag_force = force;
+        frag_deathtype = deathtype;
                MUTATOR_CALLHOOK(PlayerDamage_Calculate);
                damage = frag_damage;
                force = frag_force;
index 974e1a4..1780da9 100644 (file)
@@ -136,6 +136,7 @@ MUTATOR_HOOKABLE(PlayerDamage_Calculate);
        // INPUT:
                entity frag_attacker;
                entity frag_target;
+               float frag_damage;
        // INPUT, OUTPUT:
                float frag_damage;
                vector frag_force;
@@ -144,4 +145,4 @@ MUTATOR_HOOKABLE(PlayerPowerups);
        // called at the end of player_powerups() in cl_client.qc, used for manipulating the values which are set by powerup items.
        // INPUT
        entity self;
-       float olditems; // also technically output, but since it is at the end of the function it's useless for that :P 
\ No newline at end of file
+       float olditems; // also technically output, but since it is at the end of the function it's useless for that :P 
index f07c30e..790c9d0 100644 (file)
@@ -261,7 +261,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDamage_Calculate)
 {
     if(g_freezetag)
     {
-        if(frag_target.freezetag_frozen == 1)
+        if(frag_target.freezetag_frozen == 1 && frag_deathtype != DEATH_HURTTRIGGER)
         {
             frag_damage = 0;
             frag_force = frag_force * cvar("g_freezetag_frozen_force");