]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
Move minelayer to the new cvar system
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index f00d42df275b032424f099cf76910ef941b8b03a..057cc92cb91057536b60558cf1575cea797e8e8e 100644 (file)
@@ -274,8 +274,9 @@ void SpawnThrownWeapon (vector org, float w)
        }
        else
        {
-               if(W_IsWeaponThrowable(self.weapon))
-                       W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
+               if(WEPSET_CONTAINS_EW(self, self.weapon))
+                       if(W_IsWeaponThrowable(self.weapon))
+                               W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
        }
 }
 
@@ -415,6 +416,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
        frag_inflictor = inflictor;
        frag_attacker = attacker;
        frag_target = self;
+       frag_damage = damage;
        damage_take = take;
        damage_save = save;
        damage_force = force;
@@ -497,7 +499,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
        self.dmg_inflictor = inflictor;
 
        if(g_ca && self != attacker && IS_PLAYER(attacker))
-               PlayerScore_Add(attacker, SP_SCORE, (damage - excess) * autocvar_g_ca_damage2score_multiplier);
+               PlayerTeamScore_Add(attacker, SP_SCORE, ST_SCORE, (damage - excess) * autocvar_g_ca_damage2score_multiplier);
 
        float abot, vbot, awep;
        abot = (IS_BOT_CLIENT(attacker));
@@ -581,7 +583,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                frag_deathtype = deathtype;
                MUTATOR_CALLHOOK(PlayerDies);
 
-               weapon_action(self.weapon, WR_PLAYERDEATH);
+               WEP_ACTION(self.weapon, WR_PLAYERDEATH);
 
                RemoveGrapplingHook(self);
 
@@ -681,7 +683,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                // reset fields the weapons may use just in case
                for (j = WEP_FIRST; j <= WEP_LAST; ++j)
                {
-                       weapon_action(j, WR_RESETPLAYER);
+                       WEP_ACTION(j, WR_RESETPLAYER);
                        ATTACK_FINISHED_FOR(self, j) = 0;
                }
        }