Hi,
I thought it would be interesting if a covert op could choose the enemy team’s machine gun as a weapon eg. an axis covert op could choose a Thompson as a weapon.
I have tried looking through the code for what to change and here is what I have done so far:
In bg_misc.c:
case PC_COVERTOPS:
if (weapon == WP_STEN
|| weapon == WP_SMOKE_BOMB
|| weapon == WP_SATCHEL
|| weapon == WP_AMMO
// Gordon: this is a cvt ops weapon in single player too, right?
|| weapon == WP_FG42)
return qtrue;
else if (weapon == WP_K43 || weapon == WP_THOMPSON)
return (teamNum == TEAM_AXIS);
else if (weapon == WP_GARAND || weapon == WP_MP40)
return (teamNum == TEAM_ALLIES);
break;
In bg_classes.c:
{
PC_COVERTOPS,
"characters/temperate/allied/cvops.char",
"ui/assets/mp_spy_blue.tga",
"ui/assets/mp_arrow_blue.tga",
{
WP_MP40,
WP_STEN,
WP_FG42,
WP_GARAND,
},
},
and:
{
PC_COVERTOPS,
"characters/temperate/axis/cvops.char",
"ui/assets/mp_spy_red.tga",
"ui/assets/mp_arrow_red.tga",
{
WP_THOMPSON,
WP_STEN,
WP_FG42,
WP_K43,
},
},
g_client.c:
else if( pc == PC_COVERTOPS ) {
switch( client->sess.playerWeapon ) {
case WP_THOMPSON:
case WP_MP40:
if( client->sess.sessionTeam == TEAM_AXIS ) {
AddWeaponToPlayer( client, WP_THOMPSON, 2*(GetAmmoTableData(WP_THOMPSON)->defaultStartingAmmo), GetAmmoTableData(WP_THOMPSON)->defaultStartingClip, qtrue );
break;
} else {
AddWeaponToPlayer( client, WP_MP40, 2*(GetAmmoTableData(WP_MP40)->defaultStartingAmmo), GetAmmoTableData(WP_MP40)->defaultStartingClip, qtrue );
break;
}
But I still can’t choose it as a weapon, can anyone help me with what else needs editting?
Thank you,
Shaun


:drink: :bump: