Nuclide
Software Development Kit for id Tech
Server Game

Part of the server-side progs (progs.dat). More...

Modules

 Anti-Cheat
 Cheaters Lament: passive anti-cheat system.
 
 Logging
 Server-side logging functions.
 
 Mapcycle
 Map cycle/rotation related APIs.
 
 MapTweaks
 Conditional map entity overrides.
 
 Skill
 Skill/Difficulty related APIs.
 
 Voting
 Calling votes, evaluating them.
 
 Multi-Progs, Plugin APIs
 APIs that are accessible via multiprogs.
 
 Navigation System
 APIs to interact with the navigation system powering AI entities.
 

Classes

class  button_target
 Server-Entity: Non-Moving Button. More...
 
class  cycler
 Server-Entity: Debug Model Animation Cycler. More...
 
class  cycler_sprite
 Server-Entity: Debug Sprite Cycler. More...
 
class  cycler_weapon
 TODO: Server-Entity: Weapon Viewmodel Tester. More...
 
class  cycler_wreckage
 Server-Entity: Model Emitting Smoke. More...
 
class  env_beverage
 Server-Entity: Health Refuelling Beverage. More...
 
class  env_explosion
 Server-Entity: Explosion Creator. More...
 
class  env_fade
 Server-Entity: Fade In/Out Controller. More...
 
class  env_global
 Server-Entity: Global Variable Controller. More...
 
class  env_hudhint
 Server-Entity: Displays HUD Hint Messages. More...
 
class  env_message
 Server-Entity: Displays Titles.txt Messages. More...
 
class  env_model
 Server-Entity: Decorative Model With Animation Features. More...
 
class  env_physexplosion
 Server-Entity: Triggers Physics Explosion. More...
 
class  env_render
 Server-Entity: Controls Entity Rendering Modes. More...
 
class  env_shake
 Server-Entity: Earthquake Maker. More...
 
class  env_shooter
 Server-Entity: Model Shooter. More...
 
class  env_sound
 Server-Entity: GoldSrc Audio DSP/Reverb Controller. More...
 
class  env_spark
 Server-Entity: Spark Maker. More...
 
class  func_areaportal
 Server-Entity: Visibility/Areaportal Manager. More...
 
class  func_breakable
 Server-Entity: Breakable Brush Model. More...
 
class  func_brush
 Server-Entity: Dynamic Brush Model. More...
 
class  func_button
 Server-Entity: Moving Button. More...
 
class  func_detail
 Server-Entity: Detail Geometry. More...
 
class  func_detail_illusionary
 Server-Entity: Non-Solid Detail Geometry. More...
 
class  func_door
 Server-Entity: Sliding Door. More...
 
class  func_door_rotating
 Server-Entity: Rotating Door. More...
 
class  func_guntarget
 Server-Entity: Target Practice Sign. More...
 
class  func_healthcharger
 Server-Entity: Health Charging Station. More...
 
class  func_monsterclip
 Server-Entity: Monster Clip. More...
 
class  func_mortar_field
 Server-Entity: Mortar Drop Zone. More...
 
class  func_pendulum
 Server-Entity: Swinging Pendulum. More...
 
class  func_physbox
 Server-Entity: Physically Simulated Box. More...
 
class  func_plat
 Server-Entity: Automatic Elevator. More...
 
class  func_platrot
 Server-Entity: Rotating Vertical Platform. More...
 
class  func_pushable
 Server-Entity: Pushable Brush. More...
 
class  func_recharge
 Server-Entity: Armor Recharging Station. More...
 
class  func_rot_button
 Server-Entity: Valve, Lever, Rotating Button. More...
 
class  func_rotating
 Server-Entity: Rotating Brush/Fan. More...
 
class  func_tank
 Server-Entity: Mountable Gun Turret. More...
 
class  func_tankcontrols
 Server-Entity: func_tankmortar Controller. More...
 
class  func_trackautochange
 Server-Entity: Automatic func_tracktrain Track Controller. More...
 
class  func_trackchange
 Server-Entity: func_tracktrain Track Controller. More...
 
class  func_tracktrain
 Server-Entity: Interactive Moving Train. More...
 
class  func_train
 Server-Entity: Linear Moving Brush. More...
 
class  func_traincontrols
 Server-Entity: func_tracktrain Controller. More...
 
class  func_vehiclecontrols
 Server-Entity: func_vehicle Controller. More...
 
class  func_wall_toggle
 Server-Entity: Prototype func_brush. More...
 
class  game_counter
 Server-Entity: Activation Count Based Trigger. More...
 
class  game_counter_set
 Server-Entity: game_counter Controller. More...
 
class  game_end
 Server-Entity: Intermission Controller. More...
 
class  game_player_equip
 Server-Entity: Player Inventory Controller. More...
 
class  game_player_hurt
 Server-Entity: Player Health Controller. More...
 
class  game_player_team
 Server-Entity: Player Team Controller. More...
 
class  game_score
 Server-Entity: Player Score Controller. More...
 
class  game_team_master
 Server-Entity: Team Trigger Controller. More...
 
class  game_team_set
 Server-Entity: game_team_master Controller. More...
 
class  game_text
 Server-Entity: Custom Text Message Display. More...
 
class  game_zone_player
 Server-Entity: game_counter Zone Controller. More...
 
class  gibshooter
 Server-Entity: Bouncy Gib/Model Shooter. More...
 
class  info_hint
 Server-Entity: Nodegraph Hint. More...
 
class  info_intermission
 Server-Entity: Intermission Camera. More...
 
class  info_node
 Server-Entity: Nodegraph Ground Node. More...
 
class  info_node_air
 Server-Entity: Nodegraph Air Node. More...
 
class  info_notnull
 Server-Entity: Generic In-Memory Hint. More...
 
class  info_null
 Tools-Entity: Generic Hint. More...
 
class  infodecal
 Server-Entity: Decal. More...
 
class  item_eyescanner
 Server-Entity: Iris Scanner. More...
 
class  item_food
 Server-Entity: Food Pickup. More...
 
class  item_generic
 Server-Entity: Decorative Animated Entity. More...
 
class  item_healthcharger
 Server-Entity: Health Charging Station. More...
 
class  item_recharge
 Server-Entity: Health Charging Station. More...
 
class  light
 Tool/Server-Entity: Light Source. More...
 
class  logic_auto
 Server-Entity: Map-Start Trigger. More...
 
class  logic_case
 Server-Entity: Comparison Trigger. More...
 
class  logic_relay
 Server-Entity: Relay Trigger. More...
 
class  logic_timer
 Server-Entity: Timer Trigger. More...
 
class  momentary_door
 Server-Entity: Momentary Sliding Door. More...
 
class  momentary_rot_button
 Server-Entity: Momentary Rotating Door/Lever/Valve. More...
 
class  monster_furniture
 Server-Entity: Scripted Sequence Prop. More...
 
class  monster_generic
 Server-Entity: Generic, Bleeding Character Actor. More...
 
class  monstermaker
 Server-Entity: Monster Spawner. More...
 
class  multi_manager
 Server-Entity: Triggers Up To 16 Different Targets. More...
 
class  multisource
 Server-Entity: Conditional AND Gate. More...
 
class  path_corner
 Server-Entity: Train/Mover Path Node. More...
 
class  path_track
 Server-Entity: Tracktrain Path Node. More...
 
class  phys_ballsocket
 Server-Entity: Ballsocket Physics Constraint. More...
 
class  phys_constraint
 Server-Entity: Fixed Physics Constraint. More...
 
class  phys_constraintsystem
 Server-Entity: Physics Constraint Grouping. More...
 
class  phys_convert
 Server-Entity: Static To Physics Converter. More...
 
class  phys_hinge
 Server-Entity: Hinge Physics Constraint. More...
 
class  phys_keepupright
 Server-Entity: Physics Upright Controller. More...
 
class  phys_slideconstraint
 Server-Entity: Sliding Physics Constraint. More...
 
class  player_loadsaved
 Server-Entity: Loads Last Auto-Save. More...
 
class  player_weaponstrip
 Server-Entity: Strips Player Weapons. More...
 
class  point_camera
 Server-Entity: Rendertarget Camera Viewpoint. More...
 
class  point_servercommand
 Server-Entity: Executes Console Commands. More...
 
class  point_trigger
 Server-Entity: Radius Based Trigger. More...
 
class  prop_dynamic
 Server-Entity: Dynamic, Scriptable Prop Model. More...
 
class  prop_physics
 Server-Entity: Physics Prop Model. More...
 
class  prop_static
 Server-Entity: Static Prop Model. More...
 
class  random_speaker
 Server-Entity: Sound Emitter With Random Intervals. More...
 
class  random_trigger
 Server-Entity: Trigger With Random Intervals. More...
 
class  script_brushmodel
 Server-Entity: Scriptable Brush Model. More...
 
class  script_model
 Server-Entity: Scriptable Alias Model. More...
 
class  script_origin
 Server-Entity: Script Position Hint. More...
 
class  script_struct
 Server-Entity: FIXME: Unknown. More...
 
class  script_vehicle
 Server-Entity: FIXME: Unknown. More...
 
class  scripted_sentence
 Server-Entity: Voice Acted Sequence Controller. More...
 
class  scripted_sequence
 Server-Entity: Scripted Sequence Controller. More...
 
class  targ_speaker
 Server-Entity: Redundant Sound Emitter. More...
 
class  target_cdaudio
 Server-Entity: Radius-Based CD Track Changer. More...
 
class  trigger_auto
 Server-Entity: Map Start Trigger. More...
 
class  trigger_autosave
 Server-Entity: Triggers Auto-Save. More...
 
class  trigger_cdaudio
 Server-Entity: Trigger-Based CD Track Changer. More...
 
class  info_landmark
 Server-Entity: Shared Point Between Levels. More...
 
class  trigger_changetarget
 Server-Entity: Changes Targets Of Other Entities. More...
 
class  trigger_counter
 Server-Entity: Activation Count Based Trigger. More...
 
class  trigger_endsection
 Server-Entity: Triggers Game Ending To Menu. More...
 
class  trigger_hurt
 Server-Entity: Damages/Hurts Characters. More...
 
class  trigger_look
 Server-Entity: Eye/Vision Based Trigger. More...
 
class  trigger_monsterjump
 Server-Entity: AI Jump Hint. More...
 
class  trigger_multiple
 Server-Entity: Multi Use Trigger Volume. More...
 
class  trigger_once
 Server-Entity: One-Time Use Trigger Volume. More...
 
class  trigger_playerfreeze
 Server-Entity: Player Movement Inhibitor. More...
 
class  trigger_relay
 Server-Entity: Relay With State Override. More...
 
class  trigger_teleport
 Server-Entity: Teleportation Volume. More...
 
class  trigger_transition
 Server-Entity: Level Transition Volume. More...
 
class  func_wall
 Server-Entity: Brush Model That Changes Texture. More...
 
var vector g_vectorCacheLast
 
var vector g_vectorCacheForward
 
var vector g_vectorCacheRight
 
var vector g_vectorCacheUp
 
vector anglesToForward (vector angle)
 Calculates the forward vector of a set of euler-angles. More...
 
vector anglesToRight (vector angle)
 Calculates the right vector of a set of euler-angles. More...
 
vector anglesToUp (vector angle)
 Calculates the up vector of a set of euler-angles. More...
 
float distanceSquared (vector pointA, vector pointB)
 Calculates the squared distance between two points. More...
 
float distance (vector pointA, vector pointB)
 Calculates the distance between two points. More...
 
float distance2D (vector pointA, vector pointB)
 Calculates the distance between two vectors, ignoring the height difference between them. More...
 
bool closer (vector referencePoint, vector pointA, vector pointB)
 Figure out which point is the closest between two options. More...
 
vector combineAngles (vector angleA, vector angleB)
 Calculates a set of angles from a given vector. More...
 
float length (vector toCalculate)
 Calculates accurate length of a given vector. More...
 
float lengthSquared (vector target)
 Calculates the length of a given vector using a dot product. More...
 
float vectorDot (vector vectorA, vector vectorB)
 Calculate the dot product of two vectors. More...
 
vector vectorLerp (vector fromVector, vector toVector, float lerpFraction)
 Calculates an interpolated (linear) point between two points. More...
 
vector vectorNormalize (vector toNormalize)
 Calculates a normalized version of a given vector. More...
 
vector vectorToAngles (vector toAngles)
 Calculates a set of angles from a given vector. More...
 
vector vectorToAnglesRoll (vector forwardDir, vector rollDir)
 Calculates a set of angles from a given vector, with roll support. More...
 
vector lerpAngleVector (vector inputAngle, vector endAngle, float lerpAmount)
 Lerps between two angles. More...
 
vector dirFromTarget (vector lookingEnt, vector targetEnt)
 
noref const vector g_vec_null = [0.0f, 0.0f, 0.0f]
 
vector v_forward
 
vector v_up
 
vector v_right
 
#define MATH_PI   3.1415926
 Approximation of Pi. More...
 
#define vectoangles   vectoangles2
 
vector vectoangles2 (vector fwd, optional vector up)
 
void rotatevectorsbyangle (vector angle)
 
void makevectors (vector angles)
 
float lerpAngle (float startAngle, float endAngle, float lerpAmount)
 Euler-angle lerping function that accounts for negative degrees. More...
 
float lerp (float startValue, float endValue, float lerpAmount)
 Linear lerp function. More...
 
float fixAngleDelta (float angleValue)
 Tecursive function that fixes an euler angle. More...
 
vector fixAngle (vector inputAngle)
 Recursive function that fixes euler angles. More...
 
vector reflect (vector hitDirection, vector planeNormal)
 Takes a direction and a plane normal, returns a new trajectory. More...
 
vector randomVector (bool flyUp)
 Calculates a random Vector, with every axis being a value between -1.0 and 1.0, unless flyUp is true. More...
 
vector rotateAroundPoint (vector pos, vector pivot, float degr)
 Takes a position and a pivot point and rotates point by N degrees around the pivot (YAW) More...
 
vector angleDifference (vector angle1, vector angle2)
 Calculates the difference between two angles. More...
 
vector hsvToRGB (float h, float s, float v)
 Converts a Hue-Saturation-Value pair to an RGB vector. More...
 

Detailed Description

Part of the server-side progs (progs.dat).

Macro Definition Documentation

◆ MATH_PI

#define MATH_PI   3.1415926

Approximation of Pi.

◆ vectoangles

#define vectoangles   vectoangles2

Function Documentation

◆ angleDifference()

vector angleDifference ( vector  angle1,
vector  angle2 
)

Calculates the difference between two angles.

Parameters
angle1is the first angle.
angle2is the second angle.
Returns
The difference between angle1 and angle2 in euler angles.

◆ anglesToForward()

vector anglesToForward ( vector  angle)

Calculates the forward vector of a set of euler-angles.

Will use a cached result to speed up queries.

Parameters
angleis an of euler-angle.
Returns
Directional vector pointing what the input angle is facing.

◆ anglesToRight()

vector anglesToRight ( vector  angle)

Calculates the right vector of a set of euler-angles.

Will use a cached result to speed up queries.

Parameters
angleis an of euler-angle.
Returns
Directional vector pointing right of where the input angle is facing.

◆ anglesToUp()

vector anglesToUp ( vector  angle)

Calculates the up vector of a set of euler-angles.

Will use a cached result to speed up queries.

Parameters
angleis an of euler-angle.
Returns
Directional vector pointing up of where the input angle is facing.

◆ closer()

bool closer ( vector  referencePoint,
vector  pointA,
vector  pointB 
)

Figure out which point is the closest between two options.

Parameters
referencePointis our shared point of reference.
pointAis the first point to check referencePoint against.
pointBis the second point to check referencePoint against.
Returns
Returns true if pointA is closer to referencePoint than pointB.

◆ combineAngles()

vector combineAngles ( vector  angleA,
vector  angleB 
)

Calculates a set of angles from a given vector.

Parameters
toAnglesis the vector to convert.
Returns
Euler-angles generated from the input.

◆ dirFromTarget()

vector dirFromTarget ( vector  lookingEnt,
vector  targetEnt 
)
Parameters
lookingEntis the point-of-view entity.
targetEntis the entity the lookingEnt is 'looking' at.
Returns
a normalized vector with the world space direction of entity A 'looking' at entity B.

◆ distance()

float distance ( vector  pointA,
vector  pointB 
)

Calculates the distance between two points.

Parameters
pointAis the first point.
pointBis the second point.
Returns
The distance between pointA and pointB in map units.

◆ distance2D()

float distance2D ( vector  pointA,
vector  pointB 
)

Calculates the distance between two vectors, ignoring the height difference between them.

Parameters
pointAis the first point.
pointBis the second point.
Returns
The distance between pointA and pointB in map units.

◆ distanceSquared()

float distanceSquared ( vector  pointA,
vector  pointB 
)

Calculates the squared distance between two points.

This is a lot faster than distance() calls, but does not reflect in-game units. Use it for any distance check you need to be fast.

Parameters
pointAis the first point.
pointBis the second point.
Returns
The distance between pointA and pointB in map units.

◆ fixAngle()

vector fixAngle ( vector  inputAngle)

Recursive function that fixes euler angles.

Parameters
inputAngleis the angle value to 'fix'.
Returns
Angle where pitch/yaw/roll are now between -180 and +180.

◆ fixAngleDelta()

float fixAngleDelta ( float  angleValue)

Tecursive function that fixes an euler angle.

Parameters
angleValueis the angle value to 'fix'.
Returns
Angle value between -180 and +180.

◆ hsvToRGB()

vector hsvToRGB ( float  h,
float  s,
float  v 
)

Converts a Hue-Saturation-Value pair to an RGB vector.

Parameters
angle1is the first angle.
angle2is the second angle.
Returns
An RGB color, with values ranging between 0 and 255 on each channel.

◆ length()

float length ( vector  toCalculate)

Calculates accurate length of a given vector.

Parameters
targetis the only input vector.
Returns
The accurate length of the input vector.

◆ lengthSquared()

float lengthSquared ( vector  target)

Calculates the length of a given vector using a dot product.

Parameters
targetis the only input vector.
Returns
The approximate length of the input vector.

◆ lerp()

float lerp ( float  startValue,
float  endValue,
float  lerpAmount 
)

Linear lerp function.

Parameters
startValueis the value closest when lerpAmount is 0.0
endValueis the value closest when lerpAmount is 1.0
lerpAmountis the lerp value. Between 0.0 and 1.0 is common.
Returns
Interpolated value between start and end.

◆ lerpAngle()

float lerpAngle ( float  startAngle,
float  endAngle,
float  lerpAmount 
)

Euler-angle lerping function that accounts for negative degrees.

Parameters
startValueis the value closest when lerpAmount is 0.0
endValueis the value closest when lerpAmount is 1.0
lerpAmountis the lerp value. Between 0.0 and 1.0 is common.
Returns
Interpolated angl between start and end.

◆ lerpAngleVector()

vector lerpAngleVector ( vector  inputAngle,
vector  endAngle,
float  lerpAmount 
)

Lerps between two angles.

Parameters
inputAngleis the current direction in euler angles.
endAngleis the desired end direction in euler angles.
lerpAmountsets the interpolation amount. From 0.0 to 1.0.
Returns
Euler-angles generated from the input.

◆ makevectors()

void makevectors ( vector  angles)

◆ randomVector()

vector randomVector ( bool  flyUp)

Calculates a random Vector, with every axis being a value between -1.0 and 1.0, unless flyUp is true.

Parameters
flyUpbeing true will result in the Z-axis never returning negative values.
Returns
Random output vector.

◆ reflect()

vector reflect ( vector  hitDirection,
vector  planeNormal 
)

Takes a direction and a plane normal, returns a new trajectory.

Parameters
hitDirectionis from where a trace/shot is aiming from. Usually a result from anglesToForward().
planeNormalis the impact normal. Usually retrieved from a traceline() call updating the trace_plane_normal global.
Returns
New direction, calculated from hitDirection hitting planeNormal.

◆ rotateAroundPoint()

vector rotateAroundPoint ( vector  pos,
vector  pivot,
float  degr 
)

Takes a position and a pivot point and rotates point by N degrees around the pivot (YAW)

Parameters
posis the points' current, absolute position.
pivotis the absolute position of the pivot point.
degris the rotation amount in degrees.
Returns
Point in world-space that's been rotated.

◆ rotatevectorsbyangle()

void rotatevectorsbyangle ( vector  angle)

◆ vectoangles2()

vector vectoangles2 ( vector  fwd,
optional vector  up 
)

◆ vectorDot()

float vectorDot ( vector  vectorA,
vector  vectorB 
)

Calculate the dot product of two vectors.

Parameters
vectorAis the first input.
vectorBis the second input.
Returns
The dot product of vectorA and vectorB.

◆ vectorLerp()

vector vectorLerp ( vector  fromVector,
vector  toVector,
float  lerpFraction 
)

Calculates an interpolated (linear) point between two points.

Parameters
fromVectoris the point closest when lerpFraction is 0.0.
toVectoris the point closest when lerpFraction is 1.0.
lerpFractioncontrols the fraction of the way between the two points.
Returns
A point vector containing the interpolated result.

◆ vectorNormalize()

vector vectorNormalize ( vector  toNormalize)

Calculates a normalized version of a given vector.

Parameters
toNormalizeis the vector to convert.
Returns
Normalized vector generated from the input.

◆ vectorToAngles()

vector vectorToAngles ( vector  toAngles)

Calculates a set of angles from a given vector.

Parameters
toAnglesis the vector to convert.
Returns
Euler-angles generated from the input.

◆ vectorToAnglesRoll()

vector vectorToAnglesRoll ( vector  forwardDir,
vector  rollDir 
)

Calculates a set of angles from a given vector, with roll support.

Parameters
forwardDirthe normalized forward direction vector.
rollDirthe normalized roll direction vector.
Returns
Euler-angles generated from the input.

Variable Documentation

◆ g_vec_null

noref const vector g_vec_null = [0.0f, 0.0f, 0.0f]

◆ g_vectorCacheForward

var vector g_vectorCacheForward

◆ g_vectorCacheLast

var vector g_vectorCacheLast

◆ g_vectorCacheRight

var vector g_vectorCacheRight

◆ g_vectorCacheUp

var vector g_vectorCacheUp

◆ v_forward

vector v_forward

◆ v_right

vector v_right

◆ v_up

vector v_up