]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_hagar.qc
Clean up/optimize racer code a bit. Make it use a simpler phys path when idle. Tweak...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_hagar.qc
index aa0dcdcd6ecc5cfa5bd6729ed91c9ffd3e851b70..f3a200f1ca230d9b016e07e2803cea15dbf5310e 100644 (file)
@@ -25,24 +25,15 @@ void W_Hagar_Damage (entity inflictor, entity attacker, float damage, float deat
        if (self.health <= 0)
                return;
                
-       float is_linkexplode = ((inflictor.owner == self.owner) 
+       float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : TRUE)
                && (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.
-               
-       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
 
@@ -183,7 +174,7 @@ void W_Hagar_Attack2_Load_Release (void)
 
        shots = self.hagar_load;
        missile = world;
-       while (counter < shots)
+       for(counter = 0; counter < shots; ++counter)
        {
                missile = spawn ();
                missile.owner = missile.realowner = self;
@@ -232,8 +223,6 @@ void W_Hagar_Attack2_Load_Release (void)
                CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
 
                other = missile; MUTATOR_CALLHOOK(EditProjectile);
-
-               counter = counter + 1;
        }
 
        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_hagar_secondary_load_animtime, w_ready);