Go Back   Steam Users' Forums > Steam Tool Discussions > Source Coding

Reply
 
Thread Tools Display Modes
Old 08-09-2010, 05:39 PM   #1
Smasher816
 
Join Date: May 2010
Reputation: 13
Posts: 300
Damage Override

I was playing around, adding a shotgun fire for secondary attack on the smg1. I simply copied the function from CBaseCombatWeapon::PrimaryAttack() and replaced the bullet info with
Code:
FireBulletsInfo_t info( 12, vecSrc, vecAiming, VECTOR_CONE_10DEGREES, MAX_TRACE_LENGTH, m_iSecondaryAmmoType, false );
	info.m_pAttacker = pPlayer;
	info.m_iDamage = 100;
	info.m_iPlayerDamage = 100;
However the bullets are still doing the damage in the script file. 12 bullets x 5 damage = 60damage. when i want 12x10 = 120dmg. I put 100 in all the damage value so the change would be plainly obvious, however it is still only hurting 60. Any solution?
Smasher816 is offline  
Reply With Quote
Old 08-10-2010, 12:00 AM   #2
Panties
 
 
 
Guest
Posts: n/a
I believe the damage override is defined with the ammo type. If you search your src for DMG_BUCKSHOT, you'll come up with a large table of ammo types and relative variables.
  Reply With Quote
Old 08-10-2010, 03:15 PM   #3
Smasher816
 
Join Date: May 2010
Reputation: 13
Posts: 300
ya the AmmoDef. The only parameters for damage are console commands. Do i really need to create a new damage type with a damage console variable just to have a different damaging buckshot secondary attack?
Smasher816 is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source Coding


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 03:50 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2012, All Rights Reserved.