FireBullets(): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
== Workings ==
== Workings ==


'''<code>pAmmoDef</code>''' stores the ammo definition in a pointer.
'''<code>info</code>'''
:Name given to the <code>[[FireBulletsInfo]]</code> [[struct]] that is passed into method.
 
'''<code>pAmmoDef</code>'''  
:Stores the ammo definition in a pointer.
 
'''<code>flActualDamage</code>'''
:Used to define the damage to be done to entity.
 
'''<code>iPlayerDamage</code>'''
:If it's deemed we are damaging a player, this is used instead of <code>flActualDamage</code>

Revision as of 16:12, 12 February 2010

FireBullets() is a method which handles damage for any hitscan weapon. It is passed FireBulletsInfo_t as it's required parameter, which describes the bullet in question.

Workings

info

Name given to the FireBulletsInfo struct that is passed into method.

pAmmoDef

Stores the ammo definition in a pointer.

flActualDamage

Used to define the damage to be done to entity.

iPlayerDamage

If it's deemed we are damaging a player, this is used instead of flActualDamage