Skip to content
Permalink
Browse files

game: add cvops skill points when using scoped weapon

  • Loading branch information...
Aranud committed Jul 3, 2019
1 parent f6fe203 commit 29efa680b16672057831662f3b2e21a7afa2cb7f
Showing with 11 additions and 2 deletions.
  1. +11 −2 src/game/g_stats.c
@@ -271,7 +271,7 @@ void G_UpgradeSkill(gentity_t *ent, skillType_t skill)

if (skill == classInfo->classMiscWeapons[i].skill && ent->client->sess.skill[skill] == classInfo->classMiscWeapons[i].minSkillLevel)
{
AddWeaponToPlayer(ent->client, weaponClassInfo->weapon, classInfo->classMiscWeapons[i].startingAmmo, classInfo->classMiscWeapons[i].startingClip, qfalse, INV_NONE);
AddWeaponToPlayer(ent->client, weaponClassInfo->weapon, classInfo->classMiscWeapons[i].startingAmmo, classInfo->classMiscWeapons[i].startingClip, qfalse, INV_NONE);
}
}
}
@@ -530,7 +530,16 @@ void G_AddKillSkillPoints(gentity_t *attacker, meansOfDeath_t mod, hitRegion_t h
}
}

skillType = GetMODTableData(mod)->skillType;
// use of scoped weapon give scoped weapons skills ... logic, isn't it ?
if (attacker->client->pmext.silencedSideArm & WALTTYPE_SCOPE)
{
skillType = SK_MILITARY_INTELLIGENCE_AND_SCOPED_WEAPONS;
}
else
{
skillType = GetMODTableData(mod)->skillType;
}


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

0 comments on commit 29efa68

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