Nuclide
Software Development Kit for id Tech
entities.h File Reference

Go to the source code of this file.

Enumerations

enum  entupdate_t {
  ENT_NONE = 0 , ENT_ENTITY , ENT_PMOVEVARS , ENT_ENTITYRENDERABLE ,
  ENT_ENTITYPROJECTILE , ENT_SURFPROP , ENT_PHYSICS , ENT_MONSTER ,
  ENT_TALKMONSTER , ENT_SPEAKER , ENT_PLAYER , ENT_WEAPON ,
  ENT_SPECTATOR , ENT_PORTAL , ENT_AMBIENTSOUND , ENT_BEAM ,
  ENT_FUNNEL , ENT_SMOKER , ENT_DLIGHT , ENT_PROJECTEDTEXTURE ,
  ENT_SPOTLIGHT , ENT_FOG , ENT_STEAM , ENT_FOGCONTROLLER ,
  ENT_CASCADELIGHT , ENT_LASER , ENT_PARTSYSTEM , ENT_SPRITE ,
  ENT_GLOW , ENT_SPRAY , ENT_DECAL , ENT_OLDCAMERA ,
  ENT_MONITOR , ENT_VEHICLE , ENT_TRACKTRAIN , ENT_VEH_BRUSH ,
  ENT_VEH_TANKMORTAR , ENT_VEH_4WHEEL , ENT_PROPROPE , ENT_PHYSROPE ,
  ENT_BUBBLES , ENT_CONVEYOR , ENT_WAYPOINT , ENT_INSTRUCTOR ,
  ENT_PUSH , ENT_SEPARATOR
}
 Entity update identifiers. More...
 

Functions

entity Entity_FindClosest (entity startTarget, string className)
 Returns the closest point entity of a given classname. More...
 
entity Entity_SelectRandom (string className)
 Returns a random entity of a given classname. More...
 

Enumeration Type Documentation

◆ entupdate_t

Entity update identifiers.

Enumerator
ENT_NONE 

invalid, but reserved.

ENT_ENTITY 

of type NSEntity

ENT_PMOVEVARS 
ENT_ENTITYRENDERABLE 

of type NSPMoveVars

of type NSRenderableEntity

ENT_ENTITYPROJECTILE 

of type NSProjectile

ENT_SURFPROP 

of type NSSurfacePropEntity

ENT_PHYSICS 

of type NSPhysicsEntity

ENT_MONSTER 

of type NSMonster

ENT_TALKMONSTER 

of type NSTalkMonster

ENT_SPEAKER 

of type speaker

ENT_PLAYER 

of type NSClientPlayer

ENT_WEAPON 

of type NSWeapon

ENT_SPECTATOR 

of type NSClientSpectator

ENT_PORTAL 

of type NSPortal

ENT_AMBIENTSOUND 

of type ambient_generic

ENT_BEAM 

of type env_beam

ENT_FUNNEL 

of type env_funnel

ENT_SMOKER 

of type env_smoker

ENT_DLIGHT 

of type light_dynamic

ENT_PROJECTEDTEXTURE 

of type env_projectedtexture

ENT_SPOTLIGHT 

of type point_spotlight

ENT_FOG 
ENT_STEAM 
ENT_FOGCONTROLLER 

of type env_fog_controller

ENT_CASCADELIGHT 
ENT_LASER 

of type env_laser

ENT_PARTSYSTEM 

of type info_particle_system

ENT_SPRITE 

of type env_sprite

ENT_GLOW 

of type env_glow

ENT_SPRAY 

of type spray

ENT_DECAL 

of type infodecal

ENT_OLDCAMERA 

of type trigger_camera

ENT_MONITOR 

of type func_monitor

ENT_VEHICLE 

Reserved.

ENT_TRACKTRAIN 

of type func_tracktrain

ENT_VEH_BRUSH 

of type func_vehicle

ENT_VEH_TANKMORTAR 

of type func_tankmortar

ENT_VEH_4WHEEL 

of type prop_vehicle_driveable

ENT_PROPROPE 

of type prop_rope

ENT_PHYSROPE 

of type phys_rope

ENT_BUBBLES 

of type env_bubbles

ENT_CONVEYOR 

of type func_conveyor

ENT_WAYPOINT 

of type info_waypoint

ENT_INSTRUCTOR 

of type env_instructor_hint

ENT_PUSH 

of type trigger_push

ENT_SEPARATOR 

This is a separator.

This separator is used by you to add game-specific networked entities. When declaring your own entity-update types, you want the first value to equal ENT_SEPARATOR at all times to ensure you'll not be overriding existing slots.

Function Documentation

◆ Entity_FindClosest()

entity Entity_FindClosest ( entity  startTarget,
string  className 
)

Returns the closest point entity of a given classname.

Returns 'world' or 'NULL' if it fails to find anything.

◆ Entity_SelectRandom()

entity Entity_SelectRandom ( string  className)

Returns a random entity of a given classname.

If world or 'NULL' is returned, then the given classname is not present in the map.