]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bring back the debug prints -- working on fixing a bug with hagar secondary's "is_lin...
authorSamual <samual@xonotic.org>
Wed, 26 Oct 2011 16:14:28 +0000 (12:14 -0400)
committerSamual <samual@xonotic.org>
Wed, 26 Oct 2011 16:14:28 +0000 (12:14 -0400)
qcsrc/server/w_common.qc
qcsrc/server/w_hagar.qc

index 1a995191c2f81025e9c9235d145649f0b9f82c42..45b5545dd16273a50e5fa495defb737026d1a126 100644 (file)
@@ -542,7 +542,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp
        float is_from_owner = (inflictor == projowner);
        float is_from_exception = (exception != -1);
        
        float is_from_owner = (inflictor == projowner);
        float is_from_exception = (exception != -1);
        
-       //print(strcat("from_contents ", ftos(is_from_contents), " : from_owner ", ftos(is_from_owner), " : exception ", strcat(ftos(is_from_exception), " (", ftos(exception), "). \n")));
+       print(strcat("from_contents ", ftos(is_from_contents), " : from_owner ", ftos(is_from_owner), " : exception ", strcat(ftos(is_from_exception), " (", ftos(exception), "). \n")));
 
        if(autocvar_g_projectiles_damage <= -2)
        {
 
        if(autocvar_g_projectiles_damage <= -2)
        {
index e6467e4549a60d8c7779845f467c7c3339da8a03..aa0dcdcd6ecc5cfa5bd6729ed91c9ffd3e851b70 100644 (file)
@@ -25,15 +25,24 @@ void W_Hagar_Damage (entity inflictor, entity attacker, float damage, float deat
        if (self.health <= 0)
                return;
                
        if (self.health <= 0)
                return;
                
-       float is_linkexplode = ((inflictor.realowner == self.realowner) 
+       float is_linkexplode = ((inflictor.owner == self.owner) 
                && (inflictor.projectiledeathtype & HITTYPE_SECONDARY) 
                && (self.projectiledeathtype & HITTYPE_SECONDARY));
                && (inflictor.projectiledeathtype & HITTYPE_SECONDARY) 
                && (self.projectiledeathtype & HITTYPE_SECONDARY));
+               
+       /*
+       float is_linkexplode = ( ( ((inflictor.realowner == self.realowner) 
+       && (inflictor.projectiledeathtype & HITTYPE_SECONDARY))
+       || (deathtype == DEATH_SLIME || deathtype == DEATH_LAVA) ) 
+               && (self.projectiledeathtype & HITTYPE_SECONDARY) );
+       */
        
        if(is_linkexplode)
                is_linkexplode = (is_linkexplode && autocvar_g_balance_hagar_secondary_load_linkexplode);
        else
                is_linkexplode = -1; // not secondary load, so continue as normal without exception.
                
        
        if(is_linkexplode)
                is_linkexplode = (is_linkexplode && autocvar_g_balance_hagar_secondary_load_linkexplode);
        else
                is_linkexplode = -1; // not secondary load, so continue as normal without exception.
                
+       print(strcat("is_linkexplode: ", ftos(is_linkexplode), ", inflict_owner_classname: ", inflictor.owner.classname, ", self_owner_classname: ", self.owner.classname, ". \n"));
+               
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, is_linkexplode))
                return; // g_projectiles_damage says to halt
 
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, is_linkexplode))
                return; // g_projectiles_damage says to halt