Crossbow bolt: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Brief summary for underdocumented projectile entity and it’s function)
 
mNo edit summary
Line 7: Line 7:


In touch() logic for bolt behavior.  
In touch() logic for bolt behavior.  
  Bolt Reflection
  - if the angle is right, bolts hit a solid surface and ricochet/reflect at an angle. Each bounce increases the 'gravity' of the projectile, in effect slowing its rate.
*Bolt Reflection
- behavior for impact against NPCs
if the angle is right, bolts hit a solid surface and ricochet/reflect at an angle. Each bounce increases the 'gravity' of the projectile, in effect slowing its rate.
- skin change
* behavior for impact against NPCs
- breaking glass
* skin change
- damage to triggers/breakable/props
* breaking glass
* damage to triggers/breakable/props

Revision as of 10:46, 5 December 2021

[[|]] crossbow_bolt This is the projectile fired by weapon_crossbow.

The code for this entity is found in ==weapon_crossbow.cpp==.

The bolts think() and touch(). It is

In touch() logic for bolt behavior.

  • Bolt Reflection

if the angle is right, bolts hit a solid surface and ricochet/reflect at an angle. Each bounce increases the 'gravity' of the projectile, in effect slowing its rate.

  • behavior for impact against NPCs
  • skin change
  • breaking glass
  • damage to triggers/breakable/props