Skip to content
Permalink
Browse files

game: lose cvops skill when tk with scoped weapon

  • Loading branch information...
Aranud committed Jul 3, 2019
1 parent 29efa68 commit 6795aa08353fb1e4facfa892309437320c3a87b4
Showing with 13 additions and 3 deletions.
  1. +13 −3 src/game/g_stats.c
@@ -465,14 +465,25 @@ void G_AddSkillPoints(gentity_t *ent, skillType_t skill, float points)
*/
void G_LoseKillSkillPoints(gentity_t *tker, meansOfDeath_t mod, hitRegion_t hr, qboolean splash)
{
skillType_t skillType;

if (!tker->client)
{
return;
}

if (GetMODTableData(mod)->skillType < SK_NUM_SKILLS)
if (tker->client->pmext.silencedSideArm & WALTTYPE_SCOPE)
{
skillType = SK_MILITARY_INTELLIGENCE_AND_SCOPED_WEAPONS;
}
else
{
skillType = GetMODTableData(mod)->skillType;
}

if (skillType < SK_NUM_SKILLS)
{
G_LoseSkillPoints(tker, GetMODTableData(mod)->skillType, GetMODTableData(mod)->defaultKillPoints);
G_LoseSkillPoints(tker, skillType, GetMODTableData(mod)->defaultKillPoints);
}

// prepare scoreboard
@@ -540,7 +551,6 @@ void G_AddKillSkillPoints(gentity_t *attacker, meansOfDeath_t mod, hitRegion_t h
skillType = GetMODTableData(mod)->skillType;
}


G_AddSkillPoints(attacker, skillType, points);
G_DebugAddSkillPoints(attacker, skillType, points, reason);

0 comments on commit 6795aa0

Please sign in to comment.
You can’t perform that action at this time.