Nuclide
Software Development Kit for id Technology
func_tankmortar Class Reference

About this class

Shared-Entity: Mountable Mortar Turret.

QUAKED func_tankmortar (0 .5 .8) ?

OVERVIEW

A mountable tank mortar turret type entity. A player (or NPC) can interact with it and shoot it. It's in the same family as the func_tank entity, the difference being that this shoots mortar blasts and not bullets.

KEYS

  • "targetname" : Name
  • "yawrate" : The speed of the left/right movement of the mortar.
  • "yawrange" : Range of left/right movement in degrees.
  • "pitchrate" : The speed of the up/down movement of the mortar.
  • "pitchrange" : Range of up/down movement in degrees.
  • "barrel" : Distance from origin to barrel tip in units.
  • "barrely" : Horizontal distance origin to the center of the barrel tip.
  • "barrelz" : Vertical distance origin to the center of the barrel tip.
  • "firerate" : Number of bullets fired per second.
  • "iMagnitude" : Power of each explosion.
  • "firespread" : Accuracy of the mortar. 0 is best, 4 is worst.
  • "persistance" : Time in seconds for how long an NPC might continue shooting.
  • "minRange" : Minimum range the target can be at for an NPC to fire.
  • "maxRange" : Maximum range the target can be at for an NPC to fire.
  • "spritesmoke" : Sprite to spawn for 'smoke' when the entity is fired.
  • "spriteflash" : Sprite to spawn for a 'muzzleflash' when the entity is fired.
  • "spritescale" : Scale multiplier for both smoke and flash sprites.
  • "rotatesound" : Sound file to play in a loop while barrel is rotating.

NOTES

I don't like the sprite stuff tacked on at all because of the extra networking involved and because it's so awfully GoldSrc specific. Eventually I need to design a more generic routine that allows people to just refer to materials with the appropriate blend-modes instead of hardcoding that some random sprites needs to be treated additive.

TRIVIA

This entity was introduced in Half-Life (1998).

Inheritance diagram for func_tankmortar:
NSVehicle

Public Member Functions

void func_tankmortar (void)
 
virtual void Spawned (void)
 Called when the entity is fulled initialized. More...
 
virtual void PlayerInput (void)
 
virtual void SpriteSmoke (vector)
 
virtual void SpriteFlash (vector)
 
virtual void PredictPreFrame (void)
 
virtual void PredictPostFrame (void)
 
virtual void ReceiveEntity (float, float)
 Client: Handles network updates from the server for the associated entity. More...
 
virtual void UpdateView (void)
 

Constructor & Destructor Documentation

◆ func_tankmortar()

void func_tankmortar::func_tankmortar ( void  )

Member Function Documentation

◆ PlayerInput()

void func_tankmortar::PlayerInput ( void  )
virtual

Reimplemented from NSVehicle.

◆ PredictPostFrame()

void func_tankmortar::PredictPostFrame ( void  )
virtual

Reimplemented from NSVehicle.

◆ PredictPreFrame()

void func_tankmortar::PredictPreFrame ( void  )
virtual

Reimplemented from NSVehicle.

◆ ReceiveEntity()

void func_tankmortar::ReceiveEntity ( float  flNew,
float  flChanged 
)
virtual

Client: Handles network updates from the server for the associated entity.

Reimplemented from NSVehicle.

◆ Spawned()

void func_tankmortar::Spawned ( void  )
virtual

Called when the entity is fulled initialized.

Any spawn key/value info pairs have already been dealt with. So now we can make full decisions on the entity. Always make sure to call super::Spawned(); inside your method when overriding.

Reimplemented from NSSurfacePropEntity.

◆ SpriteFlash()

void func_tankmortar::SpriteFlash ( vector  org)
virtual

◆ SpriteSmoke()

void func_tankmortar::SpriteSmoke ( vector  org)
virtual

◆ UpdateView()

void func_tankmortar::UpdateView ( void  )
virtual

Reimplemented from NSVehicle.


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