Nuclide
Software Development Kit for id Tech
NSTraceAttack Class Reference

This class handles traceline/hitscan attacks. More...

#include <NSTraceAttack.h>

Inheritance diagram for NSTraceAttack:
NSIO

Public Member Functions

void NSTraceAttack (void)
 
virtual void Save (float)
 Handles saving a copy of this entity to a given filehandle. More...
 
virtual void Restore (string, string)
 Similar to ::SpawnKey but for save-game fields. More...
 
virtual void RestoreComplete (void)
 Called when the entity has been successfully restored from a savegame file. More...
 
virtual void Fire (void)
 Call once your parameters are set up to cast the trace/hitscan. More...
 
virtual void SetShots (int)
 Sets the number of traces performed. More...
 
virtual void SetOrigin (vector)
 Sets the position of where we're firing from. More...
 
virtual void SetDamage (int)
 Sets the amount of damage a single trace will do. More...
 
virtual void SetSpread (vector)
 Sets the spread, which increases with distance. More...
 
virtual void SetWeapon (int)
 Sets the weapon associated with the trace. More...
 
virtual void SetRange (float)
 Sets the maximum range the trace will cast, before it is discarded. More...
 
virtual void SetOwner (entity)
 Sets the owner responsible for the trace. More...
 
virtual void SetDecalGroup (string)
 Sets the decal group used by the trace attack. More...
 
virtual void SetPenetrationMaxThickness (float)
 Sets the maximum thickness that the trace is not allowed to penetrate. More...
 
virtual void SetPenetrationPower (int)
 Sets the power level of the traceline when penetrating surfaces. More...
 

Detailed Description

This class handles traceline/hitscan attacks.

Constructor & Destructor Documentation

◆ NSTraceAttack()

void NSTraceAttack::NSTraceAttack ( void  )

Member Function Documentation

◆ Fire()

void NSTraceAttack::Fire ( void  )
virtual

Call once your parameters are set up to cast the trace/hitscan.

◆ Restore()

void NSTraceAttack::Restore ( string  strKey,
string  strValue 
)
virtual

Similar to ::SpawnKey but for save-game fields.

Whatever you write into file handles within your ::Save() method needs to be read back in here.

Reimplemented from NSIO.

◆ RestoreComplete()

void NSTraceAttack::RestoreComplete ( void  )
virtual

Called when the entity has been successfully restored from a savegame file.

Reimplemented from NSIO.

◆ Save()

void NSTraceAttack::Save ( float  handle)
virtual

Handles saving a copy of this entity to a given filehandle.

Within you want to use the ::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.

Reimplemented from NSIO.

◆ SetDamage()

void NSTraceAttack::SetDamage ( int  iDamage)
virtual

Sets the amount of damage a single trace will do.

◆ SetDecalGroup()

void NSTraceAttack::SetDecalGroup ( string  strGroupName)
virtual

Sets the decal group used by the trace attack.

◆ SetOrigin()

void NSTraceAttack::SetOrigin ( vector  vecOrigin)
virtual

Sets the position of where we're firing from.

◆ SetOwner()

void NSTraceAttack::SetOwner ( entity  eOwner)
virtual

Sets the owner responsible for the trace.

◆ SetPenetrationMaxThickness()

void NSTraceAttack::SetPenetrationMaxThickness ( float  flThickness)
virtual

Sets the maximum thickness that the trace is not allowed to penetrate.

Your project needs to have the BULLETPENETRATION flag enabled.

◆ SetPenetrationPower()

void NSTraceAttack::SetPenetrationPower ( int  iPower)
virtual

Sets the power level of the traceline when penetrating surfaces.

Your project needs to have the BULLETPENETRATION flag enabled.

◆ SetRange()

void NSTraceAttack::SetRange ( float  flRange)
virtual

Sets the maximum range the trace will cast, before it is discarded.

◆ SetShots()

void NSTraceAttack::SetShots ( int  iShots)
virtual

Sets the number of traces performed.

Default is 1.

◆ SetSpread()

void NSTraceAttack::SetSpread ( vector  vecSpread)
virtual

Sets the spread, which increases with distance.

◆ SetWeapon()

void NSTraceAttack::SetWeapon ( int  iWeapon)
virtual

Sets the weapon associated with the trace.


The documentation for this class was generated from the following files: