]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Cleanse vehicles of SELFPARAM
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index 92710cc58264c14e1958297604cb0c32a9b3790b..2deab23d76309f527b3e0f535ead32d92e61efb2 100644 (file)
@@ -31,7 +31,7 @@ void UpdateFrags(entity player, float f)
 }
 
 void GiveFrags (entity attacker, entity targ, float f, int deathtype)
-{SELFPARAM();
+{
        // TODO route through PlayerScores instead
        if(gameover) return;
 
@@ -102,9 +102,9 @@ void GiveFrags (entity attacker, entity targ, float f, int deathtype)
        }
 
        // FIXME fix the mess this is (we have REAL points now!)
-       if(MUTATOR_CALLHOOK(GiveFragsForKill, self, attacker, targ, f))
+       if(MUTATOR_CALLHOOK(GiveFragsForKill, attacker, targ, f))
        {
-               f = frag_score;
+               f = M_ARGV(2, float);
        }
 
        attacker.totalfrags += f;
@@ -612,7 +612,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
        {
                // exit the vehicle before killing (fixes a crash)
                if(IS_PLAYER(targ) && targ.vehicle)
-                       WITHSELF(targ, vehicles_exit(VHEF_RELEASE));
+                       vehicles_exit(targ.vehicle, VHEF_RELEASE);
 
                // These are ALWAYS lethal
                // No damage modification here