]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert entcs back, and use getplayerorigin() to get the origin for the effect
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 25 Aug 2011 19:51:35 +0000 (22:51 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 25 Aug 2011 19:51:35 +0000 (22:51 +0300)
qcsrc/client/damage.qc
qcsrc/server/ent_cs.qc

index 6bf0181dcab7d3d565efc021130fdf414d49b41a..c264dd5eb61ff548b46461cda67bb2f1bcf67275 100644 (file)
@@ -246,7 +246,7 @@ void Ent_DamageEffect_Think()
        self.nextthink = time;
 
        float foundgib;
-       entity entcs;
+       vector org;
 
        if(time >= self.lifetime)
        {
@@ -256,8 +256,8 @@ void Ent_DamageEffect_Think()
        }
        if(self.dmgtime > time)
                return;
-       entcs = entcs_receiver[self.team];
-       if(!entcs)
+       org = getplayerorigin(self.team);
+       if(org == GETPLAYERORIGIN_ERROR)
                return;
 
        // Scan the owner of all gibs in the world. If a gib owner is the same as the player we're applying
@@ -283,7 +283,7 @@ void Ent_DamageEffect_Think()
                return; // if we aren't in third person mode, hide own damage effect
 
        // Now apply the effect to actual players
-       pointparticles(self.dmgpartnum, entcs.origin, '0 0 0', 1);
+       pointparticles(self.dmgpartnum, org, '0 0 0', 1);
        self.dmgtime = time + autocvar_cl_damageeffect_player;
 }
 
index e1b0efb67324212eeac280f5795731d1ab2202a5..9c4bf59758770d4fc6f90f6abcf3560a21e27081 100644 (file)
@@ -24,16 +24,15 @@ float entcs_customize()
 {
        entity o;
        o = self.owner;
-       //if(o.deadflag != DEAD_NO) // allow sending entcs for dead players, for damage effects to work. To be decided!
-       //      return FALSE;
+       if(o.deadflag != DEAD_NO)
+               return FALSE;
        if(o.classname != "player")
                return FALSE;
-       //if(other == o) // allow sending entcs for self, for damage effects to work. To be decided!
-       //      return FALSE;
+       if(other == o)
+               return FALSE;
        if(other.classname == "player")
                if(!teamplay || o.team != other.team)
-                       //if not (radar_showennemies)
-                       if not (checkpvs(other.origin + other.view_ofs, o))  // allow sending entcs for enemies in view, for damage effects to work. To be decided!
+                       if not (radar_showennemies)
                                return FALSE;
        return TRUE;
 }