X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_electro.qc;h=08b963431d7b5e1a8246caff05bdb4210f654c3f;hb=a34d019ec3e7edc1f5c0deeaf7ecb8cbc39da9fc;hp=526d4cd32d6253ff11f5b07022f8e76bd0b369f7;hpb=6d6a01255c7a5c146bbeb3daae6f527dd40f98d4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index 526d4cd32..08b963431 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -83,13 +83,19 @@ void W_Plasma_Damage (entity inflictor, entity attacker, float damage, float dea { if(self.health <= 0) return; + // note: combos are usually triggered by W_Plasma_TriggerCombo, not damage + float is_combo = (inflictor.classname == "plasma_chain" || inflictor.classname == "plasma_prim"); + + if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, is_combo)) + return; // g_projectiles_damage says to halt + self.health = self.health - damage; if (self.health <= 0) { self.takedamage = DAMAGE_NO; self.nextthink = time; - if (inflictor.classname == "plasma_chain" || inflictor.classname == "plasma_prim") + if (is_combo) { // change owner to whoever caused the combo explosion self.realowner = inflictor.realowner; @@ -175,6 +181,7 @@ void W_Electro_Attack2() proj.health = autocvar_g_balance_electro_secondary_health; proj.event_damage = W_Plasma_Damage; proj.flags = FL_PROJECTILE; + proj.damagedbycontents = (autocvar_g_balance_electro_secondary_damagedbycontents); proj.bouncefactor = autocvar_g_balance_electro_secondary_bouncefactor; proj.bouncestop = autocvar_g_balance_electro_secondary_bouncestop;