]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
we don't use "corpse" and "gib" classnames anywhere
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 30 Jun 2011 09:51:41 +0000 (11:51 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 30 Jun 2011 09:51:41 +0000 (11:51 +0200)
qcsrc/server/cl_player.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_triggers.qc
qcsrc/server/nexball.qc
qcsrc/server/t_jumppads.qc

index dc5c0addce9d94437f030a53e0f3add7eb883120..cd846b15bfadcf0efbf9f3ecc0f9c07d80b91ceb 100644 (file)
@@ -530,7 +530,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                // escape a lava pit or similar
                //self.pushltime = 0;
        }
-       else if(attacker.classname == "player" || attacker.classname == "gib")
+       else if(attacker.classname == "player")
        {
                self.pusher = attacker;
                self.pushltime = time + autocvar_g_maxpushtime;
@@ -643,7 +643,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
 
                if(self.flagcarried)
                {
-                       if(attacker.classname != "player" && attacker.classname != "gib")
+                       if(attacker.classname != "player")
                                DropFlag(self.flagcarried, self, attacker); // penalty for flag loss by suicide
                        else if(attacker.team == self.team)
                                DropFlag(self.flagcarried, attacker, attacker); // penalty for flag loss by suicide/teamkill
index 98bf87f5aca0b6e803bed9262289a44b2d99c8a2..9eaf82dc42d5684be97ad93507aa5b22b376e6eb 100644 (file)
@@ -299,13 +299,9 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
        string  s, a, msg;
        float w, type;
 
-       if (targ.classname == "player" || targ.classname == "corpse")
+       if (targ.classname == "player")
        {
-               if (targ.classname == "corpse")
-                       s = "A corpse";
-               else
-                       s = targ.netname;
-
+               s = targ.netname;
                a = attacker.netname;
 
                if (targ == attacker) // suicides
@@ -333,7 +329,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
 
                        Send_KillNotification(s, msg, ftos(w), deathtype, MSG_SUICIDE);
                }
-               else if (attacker.classname == "player" || attacker.classname == "gib")
+               else if (attacker.classname == "player")
                {
                        if(teamplay && attacker.team == targ.team)
                        {
index 98adee0c179ef346e5c0575729b9e27bb8b9c006..1f3c7f548613cca06e3bee3003e924d9d74994ba 100644 (file)
@@ -1377,7 +1377,7 @@ void trigger_impulse_touch1()
        if (self.active != ACTIVE_ACTIVE) 
                return;
 
-       if(!isPushable(other))
+       if (!isPushable(other))
                return;
 
        EXACTTRIGGER_TOUCH;
@@ -1415,24 +1415,7 @@ void trigger_impulse_touch2()
        if (self.active != ACTIVE_ACTIVE) 
                return;
 
-       // FIXME: Better checking for what to push and not.
-       if not(other.iscreature)
-       if (other.classname != "corpse")
-       if (other.classname != "body")
-       if (other.classname != "gib")
-       if (other.classname != "missile")
-       if (other.classname != "rocket")
-       if (other.classname != "casing")
-       if (other.classname != "grenade")
-       if (other.classname != "plasma")
-       if (other.classname != "plasma_prim")
-       if (other.classname != "plasma_chain")
-       if (other.classname != "droppedweapon")
-       if (other.classname != "nexball_basketball")
-       if (other.classname != "nexball_football")
-               return;
-
-       if (other.deadflag && other.iscreature)
+       if (!isPushable(other))
                return;
 
        EXACTTRIGGER_TOUCH;
@@ -1456,24 +1439,7 @@ void trigger_impulse_touch3()
        if (self.active != ACTIVE_ACTIVE) 
                return;
 
-       // FIXME: Better checking for what to push and not.
-       if not(other.iscreature)
-       if (other.classname != "corpse")
-       if (other.classname != "body")
-       if (other.classname != "gib")
-       if (other.classname != "missile")
-       if (other.classname != "rocket")
-       if (other.classname != "casing")
-       if (other.classname != "grenade")
-       if (other.classname != "plasma")
-       if (other.classname != "plasma_prim")
-       if (other.classname != "plasma_chain")
-       if (other.classname != "droppedweapon")
-       if (other.classname != "nexball_basketball")
-       if (other.classname != "nexball_football")
-               return;
-
-       if (other.deadflag && other.iscreature)
+       if (!isPushable(other))
                return;
 
        EXACTTRIGGER_TOUCH;
index 1cfbbe7b73e95ebb1553a113db42eb0a05cede25..b43333bcda41432ba781e98bd477621654724815 100644 (file)
@@ -597,7 +597,7 @@ void W_Nexball_Touch (void)
 
        PROJECTILE_TOUCH;
        if(attacker.team != other.team || g_nexball_basketball_teamsteal)
-       if((ball = other.ballcarried) && (attacker.classname == "player" || attacker.classname == "gib"))
+       if((ball = other.ballcarried) && (attacker.classname == "player"))
        {
                other.velocity = other.velocity + normalize(self.velocity) * other.damageforcescale * autocvar_g_balance_nexball_secondary_force;
                other.flags &~= FL_ONGROUND;
index a61c6a79decd6c01d0e63317ca5b79b5db4cf783..8da124971f144dd82219e59216d93adfcbaeea4a 100644 (file)
@@ -130,22 +130,7 @@ void trigger_push_touch()
        if (self.active == ACTIVE_NOT)
                return;
 
-       if not(other.iscreature)
-       if (other.classname != "body")
-       if (other.classname != "casing")
-       if (other.classname != "corpse")
-       if (other.classname != "droppedweapon")
-       if (other.classname != "gib")
-       if (other.classname != "keepawayball")
-       if (other.classname != "nexball_basketball")
-       if (other.classname != "nexball_football")
-       if (!other.projectiledeathtype || other.classname == "bullet")
-               return;
-
-       if(!isPushable(other))
-               return;
-
-       if (other.deadflag && other.iscreature)
+       if (!isPushable(other))
                return;
 
        if(self.team)