OK,
here's how to create a power-shotgun:
1. Open "shotgun.cpp"
2. Goto the function "void CShotgun::SecondaryAttack( void )"
3. Find the line that says "if ( g_pGameRules->IsDeathmatch() )"
which is
around line 282
4. In that "if" statement, it has the line:
m_pPlayer->FireBullets( 8, vecSrc,
vecAiming,VECTOR_CONE_DM_DOUBLESHOTGUN, 2048, BULLET_PLAYER_BUCKSHOT,
0 );
Comment it out and replace it with this line:
m_pPlayer->FireBullets( 100, vecSrc, vecAiming, Vector(
0.52095, 0.13086, 0.00 ), 2048, BULLET_PLAYER_BUCKSHOT, 0 );
5. Compile and run it.. use the secondary
attack on the shotgun to get a huge buckshot spread!
Explanation:
In step four, in the function "FireBullets": the first paramter is
the number of "pellets" the shotgun shoots.. the default
is 8 for multiplayer (I think) and I changed it to 100 the fourth
parameter is the shot-radius (how wide the spread is). Using the
original values defined at the top of the file, tripled them to get
a much bigger spread (60 x 15 degrees). No need to change the
single-player values, obviously. |