csdefs.qc (97931B)
1 /* 2 This file was automatically generated by FTE QuakeWorld v1.03 3 This file can be regenerated by issuing the following command: 4 pr_dumpplatform -O csdefs -Tcs 5 Available options: 6 -Ffte - target only FTE (optimations and additional extensions) 7 -Tnq - dump specifically NQ fields 8 -Tqw - dump specifically QW fields 9 -Tcs - dump specifically CSQC fields 10 -Tmenu - dump specifically menuqc fields 11 -Fdefines - generate #defines instead of constants 12 -Faccessors - use accessors instead of basic types via defines 13 -O - write to a different qc file 14 */ 15 #pragma noref 1 16 #pragma warning error Q101 /*too many parms*/ 17 #pragma warning error Q105 /*too few parms*/ 18 #pragma warning enable F301 /*non-utf-8 strings*/ 19 #pragma warning enable F302 /*uninitialised locals*/ 20 #pragma target FTE 21 #ifndef CSQC 22 #define CSQC 23 #endif 24 #define strbuf float 25 #define searchhandle float 26 #define hashtable float 27 #define infostring string 28 #define filestream float 29 entity self; /* The magic me */ 30 entity other; /* Valid in touch functions, this is the entity that we touched. */ 31 entity world; /* The null entity. Hurrah. Readonly after map spawn time. */ 32 float time; /* The current game time. Stops when paused. */ 33 float cltime; /* A local timer that ticks relative to local time regardless of latency, packetloss, or pause. */ 34 float frametime; /* The time since the last physics/render/input frame. */ 35 float player_localentnum; /* This is entity number the player is seeing from/spectating, or the player themself, can change mid-map. */ 36 float player_localnum; /* The 0-based player index, valid for getplayerkeyvalue calls. */ 37 float maxclients; /* Maximum number of player slots on the server. */ 38 float clientcommandframe; /* This is the input-frame sequence. frames < clientcommandframe have been sent to the server. frame==clientcommandframe is still being generated and can still change. */ 39 float servercommandframe; /* This is the input-frame that was last acknowledged by the server. Input frames greater than this should be applied to the player's entity. */ 40 string mapname; /* The short name of the map. */ 41 float intermission; 42 vector v_forward, v_up, v_right; 43 vector view_angles; 44 float trace_allsolid, trace_startsolid, trace_fraction; 45 vector trace_endpos, trace_plane_normal; 46 float trace_plane_dist; 47 entity trace_ent; 48 float trace_inopen; 49 float trace_inwater; 50 float input_timelength; 51 vector input_angles; 52 vector input_movevalues; 53 float input_buttons; 54 float input_impulse; 55 void end_sys_globals; 56 .float modelindex; 57 .vector absmin; 58 .vector absmax; 59 .float entnum; /* The entity number as its known on the server. */ 60 .float drawmask; /* Acts as a filter in the addentities call. */ 61 .float() predraw; /* Called by addentities after the filter and before the entity is actually drawn. Do your interpolation and animation in here. Should return one of the PREDRAW_* constants. */ 62 .float movetype; 63 .float solid; 64 .vector origin; 65 .vector oldorigin; 66 .vector velocity; 67 .vector angles; 68 .vector avelocity; 69 .float pmove_flags; 70 .string classname; 71 .float renderflags; 72 .string model; 73 .float frame; 74 .float frame1time; /* The absolute time into the animation/framegroup specified by .frame. */ 75 .float frame2; 76 .float frame2time; /* The absolute time into the animation/framegroup specified by .frame2. */ 77 .float lerpfrac; /* If 0, use frame1 only. If 1, use frame2 only. Mix them together for values between. */ 78 .float skin; 79 .float effects; 80 .vector mins; 81 .vector maxs; 82 .vector size; 83 .void() touch; 84 .void() think; 85 .void() blocked; 86 .float nextthink; 87 .entity chain; 88 .entity enemy; 89 .float flags; 90 .float colormap; 91 .entity owner; 92 void end_sys_fields; 93 94 .vector punchangle; 95 .float gravity; 96 .float hull; /* Overrides the hull used by the entity for walkmove/movetogoal and not traceline/tracebox. */ 97 .entity movechain; /* This is a linked list of entities which will be moved whenever this entity moves, logically they are attached to this entity. */ 98 .void() chainmoved; /* Called when the entity is moved as a result of being part of another entity's .movechain */ 99 .void(float old, float new) contentstransition; /* This function is called when the entity moves between water and air. If specified, default splash sounds will be disabled allowing you to provide your own. */ 100 .float dimension_solid; /* This is the bitmask of dimensions which the entity is solid within. */ 101 .float dimension_hit; /* This is the bitmask of dimensions which the entity will be blocked by. If other.dimension_solid & self.dimension_hit, our traces will impact and not proceed. If its false, the traces will NOT impact, allowing self to pass straight through. */ 102 .float hitcontentsmask; 103 .float scale; /* Multiplier that resizes the entity. 1 is normal sized, 2 is double sized. scale 0 is remapped to 1. In SSQC, this is limited to 1/16th precision, with a maximum just shy of 16. */ 104 .float fatness; /* How many QuakeUnits to push the entity's verticies along their normals by. */ 105 .float alpha; /* The transparency of the entity. 1 means opaque, 0.0001 means virtually invisible. 0 is remapped to 1, for compatibility. */ 106 .float modelflags; /* Used to override the flags set in the entity's model. Should be set according to the MF_ constants. Use effects|=EF_NOMODELFLAGS to ignore the model's flags completely. The traileffectnum field is more versatile. */ 107 .void() customphysics; /* Called once each physics frame, overriding the entity's .movetype field and associated logic. You'll probably want to use tracebox to move it through the world. Be sure to call .think as appropriate. */ 108 .entity tag_entity; 109 .float tag_index; 110 .float skeletonindex; /* This object serves as a container for the skeletal bone states used to override the animation data. */ 111 .vector colormod; 112 .vector glowmod; 113 .vector gravitydir; /* Specifies the direction in which gravity acts. Must be normalised. '0 0 0' also means down. Use '0 0 1' if you want the player to be able to run on ceilings. */ 114 .vector(vector org, vector ang) camera_transform; /* Provides portal transform information for portal surfaces attached to this entity. Also used to open up pvs in ssqc. */ 115 .float geomtype; 116 .float friction; 117 .float erp; 118 .float jointtype; 119 .float mass; 120 .float bouncefactor; 121 .float bouncestop; 122 .float idealpitch; 123 .float pitch_speed; 124 .float forceshader; /* Contains a shader handle used to replace all surfaces upon the entity. */ 125 .float baseframe; /* See basebone */ 126 .float baseframe2; /* See basebone */ 127 .float baseframe1time; /* See basebone */ 128 .float baseframe2time; /* See basebone */ 129 .float baselerpfrac; /* See basebone */ 130 .float basebone; /* The base* frame animations are equivelent to their non-base versions, except that they only affect bone numbers below the 'basebone' value. This means that the base* animation can affect the legs of a skeletal model independantly of the normal animation fields affecting the torso area. For more complex animation than this, use skeletal objects. */ 131 .float bonecontrol1; /* Halflife model format bone controller. On player models, this typically affects the spine's yaw. */ 132 .float bonecontrol2; /* Halflife model format bone controller. On player models, this typically affects the spine's yaw. */ 133 .float bonecontrol3; /* Halflife model format bone controller. On player models, this typically affects the spine's yaw. */ 134 .float bonecontrol4; /* Halflife model format bone controller. On player models, this typically affects the spine's yaw. */ 135 .float bonecontrol5; /* Halflife model format bone controller. This typically affects the mouth. */ 136 .float subblendfrac; /* Weird animation value specific to halflife models. On player models, this typically affects the spine's pitch. */ 137 .float basesubblendfrac; /* See basebone */ 138 noref void(float reqid, float responsecode, string resourcebody) URI_Get_Callback; /* Called as an eventual result of the uri_get builtin. */ 139 noref void(float apilevel, string enginename, float engineversion) CSQC_Init; /* Called at startup. enginename and engineversion are arbitary hints and can take any form. enginename should be consistant between revisions, but this cannot truely be relied upon. */ 140 noref void() CSQC_WorldLoaded; /* Called after model+sound precaches have been executed. Gives a chance for the qc to read the entity lump from the bsp. */ 141 noref void() CSQC_Shutdown; /* Specifies that the csqc is going down. Save your persistant settings here. */ 142 noref void(float vwidth, float vheight, float notmenu) CSQC_UpdateView; /* Called every single video frame. The CSQC is responsible for rendering the entire screen. */ 143 noref void(string msg) CSQC_Parse_StuffCmd; /* Gives the CSQC a chance to intercept stuffcmds. Use the tokenize builtin to parse the message. Unrecognised commands would normally be localcmded, but its probably better to drop unrecognised stuffcmds completely. */ 144 noref float(string msg) CSQC_Parse_CenterPrint; /* Gives the CSQC a chance to intercept centerprints. Return true if you wish the engine to otherwise ignore the centerprint. */ 145 noref void(string printmsg, float printlvl) CSQC_Parse_Print; /* Gives the CSQC a chance to intercept sprint/bprint builtin calls. CSQC should filter by the client's current msg setting and then pass the message on to the print command, or handle them itself. */ 146 noref void() CSQC_Parse_Event; /* Called when the client receives an SVC_CGAMEPACKET. The csqc should read the data or call the error builtin if it does not recognise the message. */ 147 noref float(float evtype, float scanx, float chary, float devid) CSQC_InputEvent; /* Called whenever a key is pressed, the mouse is moved, etc. evtype will be one of the IE_* constants. The other arguments vary depending on the evtype. Key presses are not guarenteed to have both scan and unichar values set at the same time. */ 148 noref void() CSQC_Input_Frame; /* Called just before each time clientcommandframe is updated. You can edit the input_* globals in order to apply your own player inputs within csqc, which may allow you a convienient way to pass certain info to ssqc. */ 149 noref float(string cmd) CSQC_ConsoleCommand; /* Called if the user uses any console command registed via registercommand. */ 150 noref float(string text, string info) CSQC_ConsoleLink; /* Called if the user clicks a ^[text\infokey\infovalue^] link. Use infoget to read/check each supported key. Return true if you wish the engine to not attempt to handle the link itself. */ 151 noref void(float isnew) CSQC_Ent_Update; 152 noref void() CSQC_Ent_Remove; 153 noref float(float entnum, float channel, string soundname, float vol, float attenuation, vector pos, float pitchmod) CSQC_Event_Sound; 154 noref float(string resname, string restype) CSQC_LoadResource; /* Called each time some resource is being loaded. CSQC can invoke various draw calls to provide a loading screen, until WorldLoaded is called. */ 155 noref float() CSQC_Parse_TempEntity; /* Please don't use this. Use CSQC_Parse_Event and multicasts instead. */ 156 noref void(string cmdtext) GameCommand; 157 var float physics_mode = 2; /* 0: original csqc - physics are not run 158 1: DP-compat. Thinks occur, but not true movetypes. 159 2: movetypes occur just as they do in ssqc. */ 160 float gamespeed; /* Set by the engine, this is the value of the sv_gamespeed cvar */ 161 float numclientseats; /* This is the number of splitscreen clients currently running on this client. */ 162 var vector drawfontscale = '1 1 0'; /* Specifies a scaler for all text rendering. There are other ways to implement this. */ 163 float drawfont; /* Allows you to choose exactly which font is to be used to draw text. Fonts can be registered/allocated with the loadfont builtin. */ 164 const float FONT_DEFAULT = 0; 165 const float TRUE = 1; 166 const float FALSE = 0; /* File not found... */ 167 const float M_PI = 3.14159; 168 const float MOVETYPE_NONE = 0; 169 const float MOVETYPE_WALK = 3; 170 const float MOVETYPE_STEP = 4; 171 const float MOVETYPE_FLY = 5; 172 const float MOVETYPE_TOSS = 6; 173 const float MOVETYPE_PUSH = 7; 174 const float MOVETYPE_NOCLIP = 8; 175 const float MOVETYPE_FLYMISSILE = 9; 176 const float MOVETYPE_BOUNCE = 10; 177 const float MOVETYPE_BOUNCEMISSILE = 11; 178 const float MOVETYPE_FOLLOW = 12; 179 const float MOVETYPE_WALLWALK = 31; /* Players using this movetype will be able to orient themselves to walls, and then run up them. */ 180 const float MOVETYPE_PHYSICS = 32; /* Enable the use of ODE physics upon this entity. */ 181 const float SOLID_NOT = 0; 182 const float SOLID_TRIGGER = 1; 183 const float SOLID_BBOX = 2; 184 const float SOLID_SLIDEBOX = 3; 185 const float SOLID_BSP = 4; 186 const float SOLID_CORPSE = 5; 187 const float SOLID_LADDER = 20; /* Obsolete and may be removed at some point. Use skin=CONTENT_LADDER and solid_bsp or solid_trigger instead. */ 188 const float SOLID_PHYSICS_BOX = 32; 189 const float SOLID_PHYSICS_SPHERE = 33; 190 const float SOLID_PHYSICS_CAPSULE = 34; 191 const float SOLID_PHYSICS_TRIMESH = 35; 192 const float SOLID_PHYSICS_CYLINDER = 36; 193 const float GEOMTYPE_NONE = -1; 194 const float GEOMTYPE_SOLID = 0; 195 const float GEOMTYPE_BOX = 1; 196 const float GEOMTYPE_SPHERE = 2; 197 const float GEOMTYPE_CAPSULE = 3; 198 const float GEOMTYPE_TRIMESH = 4; 199 const float GEOMTYPE_CYLINDER = 5; 200 const float GEOMTYPE_CAPSULE_X = 6; 201 const float GEOMTYPE_CAPSULE_Y = 7; 202 const float GEOMTYPE_CAPSULE_Z = 8; 203 const float GEOMTYPE_CYLINDER_X = 9; 204 const float GEOMTYPE_CYLINDER_Y = 10; 205 const float GEOMTYPE_CYLINDER_Z = 11; 206 const float JOINTTYPE_FIXED = -1; 207 const float JOINTTYPE_POINT = 1; 208 const float JOINTTYPE_HINGE = 2; 209 const float JOINTTYPE_SLIDER = 3; 210 const float JOINTTYPE_UNIVERSAL = 4; 211 const float JOINTTYPE_HINGE2 = 5; 212 const float GE_MAXENTS = -1; /* Valid for getentity, ignores the entity argument. Returns the maximum number of entities which may be valid, to avoid having to poll 65k when only 100 are used. */ 213 const float GE_ACTIVE = 0; /* Valid for getentity. Returns whether this entity is known to the client or not. */ 214 const float GE_ORIGIN = 1; /* Valid for getentity. Returns the interpolated .origin. */ 215 const float GE_FORWARD = 2; /* Valid for getentity. Returns the interpolated forward vector. */ 216 const float GE_RIGHT = 3; /* Valid for getentity. Returns the entity's right vector. */ 217 const float GE_UP = 4; /* Valid for getentity. Returns the entity's up vector. */ 218 const float GE_SCALE = 5; /* Valid for getentity. Returns the entity .scale. */ 219 const float GE_ORIGINANDVECTORS = 6; /* Valid for getentity. Returns interpolated .origin, but also sets v_forward, v_right, and v_up accordingly. Use vectoangles(v_forward,v_up) to determine the angles. */ 220 const float GE_ALPHA = 7; /* Valid for getentity. Returns the entity alpha. */ 221 const float GE_COLORMOD = 8; /* Valid for getentity. Returns the colormod vector. */ 222 const float GE_PANTSCOLOR = 9; /* Valid for getentity. Returns the entity's lower color (from .colormap), as a palette range value. */ 223 const float GE_SHIRTCOLOR = 10; /* Valid for getentity. Returns the entity's lower color (from .colormap), as a palette range value. */ 224 const float GE_SKIN = 11; /* Valid for getentity. Returns the entity's .skin index. */ 225 const float GE_MINS = 12; /* Valid for getentity. Guesses the entity's .min vector. */ 226 const float GE_MAXS = 13; /* Valid for getentity. Guesses the entity's .max vector. */ 227 const float GE_ABSMIN = 14; /* Valid for getentity. Guesses the entity's .absmin vector. */ 228 const float GE_ABSMAX = 15; /* Valid for getentity. Guesses the entity's .absmax vector. */ 229 const float CONTENT_EMPTY = -1; 230 const float CONTENT_SOLID = -2; 231 const float CONTENT_WATER = -3; 232 const float CONTENT_SLIME = -4; 233 const float CONTENT_LAVA = -5; 234 const float CONTENT_SKY = -6; 235 const float CONTENT_LADDER = -16; /* If this value is assigned to a solid_bsp's .skin field, the entity will become a ladder volume. */ 236 const float CHAN_AUTO = 0; /* The automatic channel, play as many sounds on this channel as you want, and they'll all play, however the other channels will replace each other. */ 237 const float CHAN_WEAPON = 1; 238 const float CHAN_VOICE = 2; 239 const float CHAN_ITEM = 3; 240 const float CHAN_BODY = 4; 241 const float ATTN_NONE = 0; /* Sounds with this attenuation can be heard throughout the map */ 242 const float ATTN_NORM = 1; /* Standard attenuation */ 243 const float ATTN_IDLE = 2; /* Extra attenuation so that sounds don't travel too far. */ 244 const float ATTN_STATIC = 3; /* Even more attenuation to avoid torches drowing out everything else throughout the map. */ 245 const string INFOKEY_P_PING = "ping"; /* The player's ping time, in milliseconds. */ 246 const string INFOKEY_P_NAME = "name"; /* The player's name. */ 247 const string INFOKEY_P_TOPCOLOR = "topcolor"; /* The player's upper/shirt colour (palette index). */ 248 const string INFOKEY_P_BOTTOMCOLOR = "bottomcolor"; /* The player's lower/pants/trouser colour (palette index). */ 249 const string INFOKEY_P_TOPCOLOR_RGB = "topcolor_rgb"; /* The player's upper/shirt colour as an rgb value in a format usable with stov. */ 250 const string INFOKEY_P_BOTTOMCOLOR_RGB = "bottomcolor_rgb"; /* The player's lower/pants/trouser colour as an rgb value in a format usable with stov. */ 251 const string INFOKEY_P_MUTED = "ignored"; /* 0: we can see the result of the player's say/say_team commands. 1: we see no say/say_team messages from this player. Use the ignore command to toggle this value. */ 252 const string INFOKEY_P_VOIP_MUTED = "vignored"; /* 0: we can hear this player when they speak (assuming voip is generally enabled). 1: we ignore everything this player says. Use cl_voip_mute to change the values. */ 253 const string INFOKEY_P_ENTERTIME = "entertime"; /* Reads the timestamp at which the player entered the game, in terms of csqc's time global. */ 254 const string INFOKEY_P_FRAGS = "frags"; /* Reads a player's frag count. */ 255 const string INFOKEY_P_PACKETLOSS = "pl"; /* Reads a player's packetloss, as a percentage. */ 256 const string INFOKEY_P_VOIPSPEAKING = "voipspeaking"; /* Boolean value that says whether the given player is currently sending voice information. */ 257 const string INFOKEY_P_VOIPLOUDNESS = "voiploudness"; /* Only valid for the local player. Gives a value between 0 and 1 to indicate to the user how loud their mic is. */ 258 const float FL_FLY = 1; 259 const float FL_SWIM = 2; 260 const float FL_CLIENT = 8; 261 const float FL_INWATER = 16; 262 const float FL_MONSTER = 32; 263 const float FL_ITEM = 256; 264 const float FL_ONGROUND = 512; 265 const float FL_PARTIALGROUND = 1024; 266 const float FL_WATERJUMP = 2048; 267 const float FL_JUMPRELEASED = 4096; 268 const float FL_FINDABLE_NONSOLID = 16384; /* Allows this entity to be found with findradius */ 269 const float MOVE_NORMAL = 0; 270 const float MOVE_NOMONSTERS = 1; /* The trace will ignore all non-solid_bsp entities. */ 271 const float MOVE_MISSILE = 2; /* The trace will use a bbox size of +/- 15 against entities with FL_MONSTER set. */ 272 const float MOVE_HITMODEL = 4; /* Traces will impact the actual mesh of the model instead of merely their bounding box. Should generally only be used for tracelines. Note that this flag is unreliable as an object can animate through projectiles. The bounding box MUST be set to completely encompass the entity or those extra areas will be non-solid (leaving a hole for things to go through). */ 273 const float MOVE_TRIGGERS = 16; /* This trace type will impact only triggers. It will ignore non-solid entities. */ 274 const float MOVE_EVERYTHING = 32; /* This type of trace will hit solids and triggers alike. Even non-solid entities. */ 275 const float MOVE_ENTCHAIN = 128; /* Returns a list of entities impacted via the trace_ent.chain field */ 276 const float RESTYPE_MODEL = 0; /* RESTYPE_* constants are used as arguments with the resourcestatus builtin. */ 277 const float RESTYPE_SOUND = 1; /* precache_sound */ 278 const float RESTYPE_PARTICLE = 2; /* particleeffectnum */ 279 const float RESTYPE_PIC = 3; /* precache_pic. Status results are an amalgomation of the textures used by the named shader. */ 280 const float RESTYPE_SKIN = 4; /* setcustomskin */ 281 const float RESTYPE_TEXTURE = 5; /* Individual textures within shaders. These are not directly usable, but may be named as part of a skin file, or a shader. */ 282 const float RESSTATE_NOTKNOWN = 0; /* RESSTATE_* constants are return values from the resourcestatus builtin. The engine doesn't know about the resource if it is in this state. This means you will need to precache it. Attempting to use it anyway may result in warnings, errors, or silently succeed, depending on engine version and resource type. */ 283 const float RESSTATE_NOTLOADED = 1; /* The resource was precached, but has been flushed and there has not been an attempt to reload it. If you use the resource normally, chances are it'll be loaded but at the cost of a stall. */ 284 const float RESSTATE_LOADING = 2; /* Resources in this this state are queued for loading, and will be loaded at the engine's convienience. If you attempt to query the resource now, the engine will stall until the result is available. sounds in this state may be delayed, while models/pics/shaders may be invisible. */ 285 const float RESSTATE_FAILED = 3; /* Resources in this state are unusable/could not be loaded. You will get placeholders or dummy results. Queries will not stall the engine. The engine may display placeholder content. */ 286 const float RESSTATE_LOADED = 4; /* Resources in this state are finally usable, everything will work okay. Hurrah. Queries will not stall the engine. */ 287 const float EF_BRIGHTFIELD = 1; 288 const float EF_MUZZLEFLASH = 2; 289 const float EF_BRIGHTLIGHT = 4; 290 const float EF_DIMLIGHT = 8; 291 const float EF_ADDITIVE = 32; 292 const float EF_BLUE = 64; 293 const float EF_RED = 128; 294 const float EF_FULLBRIGHT = 512; 295 const float EF_NODEPTHTEST = 8192; 296 const float MF_ROCKET = 1; 297 const float MF_GRENADE = 2; 298 const float MF_GIB = 4; 299 const float MF_ROTATE = 8; 300 const float MF_TRACER = 16; 301 const float MF_ZOMGIB = 32; 302 const float MF_TRACER2 = 64; 303 const float MF_TRACER3 = 128; 304 const float PFLAGS_NOSHADOW = 1; /* Associated RT lights attached will not cast shadows, making them significantly faster to draw. */ 305 const float PFLAGS_CORONA = 2; /* Enables support of coronas on the associated rtlights. */ 306 const float EV_STRING = 1; 307 const float EV_FLOAT = 2; 308 const float EV_VECTOR = 3; 309 const float EV_ENTITY = 4; 310 const float EV_FUNCTION = 6; 311 const float EV_POINTER = 7; 312 const float EV_INTEGER = 8; 313 const float EV_VARIANT = 9; 314 hashtable gamestate; /* Special hash table index for hash_add and hash_get. Entries in this table will persist over map changes (and doesn't need to be created/deleted). */ 315 const float HASH_REPLACE = 256; /* Used with hash_add. Attempts to remove the old value instead of adding two values for a single key. */ 316 const float STAT_HEALTH = 0; 317 const float STAT_WEAPON = 2; 318 const float STAT_AMMO = 3; 319 const float STAT_ARMOR = 4; 320 const float STAT_WEAPONFRAME = 5; 321 const float STAT_SHELLS = 6; 322 const float STAT_NAILS = 7; 323 const float STAT_ROCKETS = 8; 324 const float STAT_CELLS = 9; 325 const float STAT_ACTIVEWEAPON = 10; 326 const float STAT_TOTALSECRETS = 11; 327 const float STAT_TOTALMONSTERS = 12; 328 const float STAT_FOUNDSECRETS = 13; 329 const float STAT_KILLEDMONSTERS = 14; 330 const float STAT_ITEMS = 15; 331 const float STAT_VIEWHEIGHT = 16; 332 const float STAT_VIEW2 = 20; /* This stat contains the number of the entity in the server's .view2 field. */ 333 const float STAT_VIEWZOOM = 21; 334 const float VF_MIN = 1; /* The top-left of the 3d viewport in screenspace. The VF_ values are used via the setviewprop/getviewprop builtins. */ 335 const float VF_MIN_X = 2; 336 const float VF_MIN_Y = 3; 337 const float VF_SIZE = 4; /* The width+height of the 3d viewport in screenspace. */ 338 const float VF_SIZE_X = 5; 339 const float VF_SIZE_Y = 6; 340 const float VF_VIEWPORT = 7; /* vector+vector. Two argument shortcut for VF_MIN and VF_SIZE */ 341 const float VF_FOV = 8; /* sets both fovx and fovy. consider using afov instead. */ 342 const float VF_FOVX = 9; /* horizontal field of view. does not consider aspect at all. */ 343 const float VF_FOVY = 10; /* vertical field of view. does not consider aspect at all. */ 344 const float VF_ORIGIN = 11; /* The origin of the view. Not of the player. */ 345 const float VF_ORIGIN_X = 12; 346 const float VF_ORIGIN_Y = 13; 347 const float VF_ORIGIN_Z = 14; 348 const float VF_ANGLES = 15; /* The angles the view will be drawn at. Not the angle the client reports to the server. */ 349 const float VF_ANGLES_X = 16; 350 const float VF_ANGLES_Y = 17; 351 const float VF_ANGLES_Z = 18; 352 const float VF_DRAWWORLD = 19; /* boolean. If set to 1, the engine will draw the world and static/persistant rtlights. If 0, the world will be skipped and everything will be fullbright. */ 353 const float VF_DRAWENGINESBAR = 20; /* boolean. If set to 1, the sbar will be drawn, and viewsize will be honoured automatically. */ 354 const float VF_DRAWCROSSHAIR = 21; /* boolean. If set to 1, the engine will draw its default crosshair. */ 355 const float VF_CL_VIEWANGLES = 33; 356 const float VF_CL_VIEWANGLES_X = 34; 357 const float VF_CL_VIEWANGLES_Y = 35; 358 const float VF_CL_VIEWANGLES_Z = 36; 359 const float VF_PERSPECTIVE = 200; /* 1: regular rendering. Fov specifies the angle. 0: isometric-style. Fov specifies the number of Quake Units each side of the viewport. */ 360 const float VF_LPLAYER = 202; /* The 'seat' number, used when running splitscreen. */ 361 const float VF_AFOV = 203; /* Aproximate fov. Matches the 'fov' cvar. The engine handles the aspect ratio for you. */ 362 const float VF_SCREENVSIZE = 204; /* Provides a reliable way to retrieve the current virtual screen size (even if the screen is automatically scaled to retain aspect). */ 363 const float VF_SCREENPSIZE = 205; /* Provides a reliable way to retrieve the current physical screen size (cvars need vid_restart for them to take effect). */ 364 const float VF_VIEWENTITY = 206; /* Changes the RF_EXTERNALMODEL flag on entities to match the new selection, and removes entities flaged with RF_VIEWENTITY. Requires cunning use of .entnum and typically requires calling addentities(MASK_VIEWMODEL) too. */ 365 const float VF_RT_DESTCOLOUR = 212; /* The texture name to write colour info into, this includes both 3d and 2d drawing. 366 Additional arguments are: format (rgba8=1,rgba16f=2,rgba32f=3), sizexy. 367 Written to by both 3d and 2d rendering. 368 Note that any rendertarget textures may be destroyed on video mode changes or so. Shaders can name render targets by prefixing texture names with '$rt:', or $sourcecolour. */ 369 const float VF_RT_SOURCECOLOUR = 209; /* The texture name to use with shaders that specify a $sourcecolour map. */ 370 const float VF_RT_DEPTH = 210; /* The texture name to use as a depth buffer. Also used for shaders that specify $sourcedepth. 1-based. Additional arguments are: format (16bit=4,24bit=5,32bit=6), sizexy. */ 371 const float VF_RT_RIPPLE = 211; /* The texture name to use as a ripplemap (target for shaders with 'sort ripple'). Also used for shaders that specify $ripplemap. 1-based. Additional arguments are: format, sizexy. */ 372 const float RF_VIEWMODEL = 1; /* Specifies that the entity is a view model, and that its origin is relative to the current view position. These entities are also subject to viewweapon bob. */ 373 const float RF_EXTERNALMODEL = 2; /* Specifies that this entity should be displayed in mirrors (and may still cast shadows), but will not otherwise be visible. */ 374 const float RF_DEPTHHACK = 4; /* Hacks the depth values such that the entity uses depth values as if it were closer to the screen. This is useful when combined with viewmodels to avoid weapons poking in to walls. */ 375 const float RF_ADDITIVE = 8; /* Shaders from this entity will temporarily be hacked to use an additive blend mode instead of their normal blend mode. */ 376 const float RF_USEAXIS = 16; /* The entity will be oriented according to the current v_forward+v_right+v_up vector values instead of the entity's .angles field. */ 377 const float RF_NOSHADOW = 32; /* This entity will not cast shadows. Often useful on view models. */ 378 const float RF_FRAMETIMESARESTARTTIMES = 64; /* Specifies that the frame1time, frame2time field are timestamps (denoting the start of the animation) rather than time into the animation. */ 379 const float IE_KEYDOWN = 0; /* Specifies that a key was pressed. Second argument is the scan code. Third argument is the unicode (printable) char value. Fourth argument denotes which keyboard(or mouse, if its a mouse 'scan' key) the event came from. Note that some systems may completely separate scan codes and unicode values, with a 0 value for the unspecified argument. */ 380 const float IE_KEYUP = 1; /* Specifies that a key was released. Arguments are the same as IE_KEYDOWN. On some systems, this may be fired instantly after IE_KEYDOWN was fired. */ 381 const float IE_MOUSEDELTA = 2; /* Specifies that a mouse was moved (touch screens and tablets typically give IE_MOUSEABS events instead, use _windowed_mouse 0 to test code to cope with either). Second argument is the X displacement, third argument is the Y displacement. Fourth argument is which mouse or touch event triggered the event. */ 382 const float IE_MOUSEABS = 3; /* Specifies that a mouse cursor or touch event was moved to a specific location relative to the virtual screen space. Second argument is the new X position, third argument is the new Y position. Fourth argument is which mouse or touch event triggered the event. */ 383 const float IE_ACCELEROMETER = 4; 384 const float IE_FOCUS = 5; /* Specifies that input focus was given. parama says mouse focus, paramb says keyboard focus. If either are -1, then it is unchanged. */ 385 const float IE_JOYAXIS = 6; /* Specifies that what value a joystick/controller axis currently specifies. x=axis, y=value. Will be called multiple times, once for each axis of each active controller. */ 386 const float FILE_READ = 0; /* The file may be read via fgets to read a single line at a time. */ 387 const float FILE_APPEND = 1; /* Like FILE_WRITE, but writing starts at the end of the file. */ 388 const float FILE_WRITE = 2; /* fputs will be used to write to the file. */ 389 const float FILE_READNL = 4; /* Like FILE_READ, except newlines are not special. fgets reads the entire file into a tempstring. */ 390 const float FILE_MMAP_READ = 5; /* The file will be loaded into memory. fgets returns a pointer to the first byte (and will always return the same value for this file). Cast this to your datatype. */ 391 const float FILE_MMAP_RW = 6; /* Like FILE_MMAP_READ, except any changes to the data will be written back to disk once the file is closed. */ 392 const float MASK_ENGINE = 1; /* Valid as an argument for addentities. If specified, all non-csqc entities will be added to the scene. */ 393 const float MASK_VIEWMODEL = 2; /* Valid as an argument for addentities. If specified, the regular engine viewmodel will be added to the scene. */ 394 const float PREDRAW_AUTOADD = 0; /* Valid as a return value from the predraw function. Returning this will cause the engine to automatically invoke addentity(self) for you. */ 395 const float PREDRAW_NEXT = 1; /* Valid as a return value from the predraw function. Returning this will simply move on to the next entity without the autoadd behaviour, so can be used for particle/invisible/special entites, or entities that were explicitly drawn with addentity. */ 396 const float LFIELD_ORIGIN = 0; 397 const float LFIELD_COLOUR = 1; 398 const float LFIELD_RADIUS = 2; 399 const float LFIELD_FLAGS = 3; 400 const float LFIELD_STYLE = 4; 401 const float LFIELD_ANGLES = 5; 402 const float LFIELD_FOV = 6; 403 const float LFIELD_CORONA = 7; 404 const float LFIELD_CORONASCALE = 8; 405 const float LFIELD_CUBEMAPNAME = 9; 406 const float LFIELD_AMBIENTSCALE = 10; 407 const float LFIELD_DIFFUSESCALE = 11; 408 const float LFIELD_SPECULARSCALE = 12; 409 const float LFIELD_ROTATION = 13; 410 const float LFLAG_NORMALMODE = 1; 411 const float LFLAG_REALTIMEMODE = 2; 412 const float LFLAG_LIGHTMAP = 4; 413 const float LFLAG_FLASHBLEND = 8; 414 const float LFLAG_NOSHADOWS = 256; 415 const float LFLAG_SHADOWMAP = 512; 416 const float LFLAG_CREPUSCULAR = 1024; 417 const float TEREDIT_RELOAD = 0; 418 const float TEREDIT_SAVE = 1; 419 const float TEREDIT_SETHOLE = 2; 420 const float TEREDIT_HEIGHT_SET = 3; 421 const float TEREDIT_HEIGHT_SMOOTH = 4; 422 const float TEREDIT_HEIGHT_SPREAD = 5; 423 const float TEREDIT_HEIGHT_RAISE = 6; 424 const float TEREDIT_HEIGHT_FLATTEN = 18; 425 const float TEREDIT_HEIGHT_LOWER = 7; 426 const float TEREDIT_TEX_KILL = 8; 427 const float TEREDIT_TEX_GET = 9; 428 const float TEREDIT_TEX_BLEND = 10; 429 const float TEREDIT_TEX_UNIFY = 11; 430 const float TEREDIT_TEX_NOISE = 12; 431 const float TEREDIT_TEX_BLUR = 13; 432 const float TEREDIT_WATER_SET = 14; 433 const float TEREDIT_MESH_ADD = 15; 434 const float TEREDIT_MESH_KILL = 16; 435 const float TEREDIT_TINT = 17; 436 const float TEREDIT_TEX_REPLACE = 19; 437 const float TEREDIT_RESET_SECT = 20; 438 const float TEREDIT_RELOAD_SECT = 21; 439 const float SLIST_HOSTCACHEVIEWCOUNT = 0; 440 const float SLIST_HOSTCACHETOTALCOUNT = 1; 441 const float SLIST_MASTERQUERYCOUNT = 2; 442 const float SLIST_MASTERREPLYCOUNT = 3; 443 const float SLIST_SERVERQUERYCOUNT = 4; 444 const float SLIST_SERVERREPLYCOUNT = 5; 445 const float SLIST_SORTFIELD = 6; 446 const float SLIST_SORTDESCENDING = 7; 447 const float SLIST_TEST_CONTAINS = 0; 448 const float SLIST_TEST_NOTCONTAIN = 1; 449 const float SLIST_TEST_LESSEQUAL = 2; 450 const float SLIST_TEST_LESS = 3; 451 const float SLIST_TEST_EQUAL = 4; 452 const float SLIST_TEST_GREATER = 5; 453 const float SLIST_TEST_GREATEREQUAL = 6; 454 const float SLIST_TEST_NOTEQUAL = 7; 455 const float SLIST_TEST_STARTSWITH = 8; 456 const float SLIST_TEST_NOTSTARTSWITH = 9; 457 void(vector vang) makevectors = #1; /* 458 Takes an angle vector (pitch,yaw,roll). Writes its results into v_forward, v_right, v_up vectors. */ 459 460 void(entity e, vector o) setorigin = #2; /* 461 Changes e's origin to be equal to o. Also relinks collision state (as well as setting absmin+absmax), which is required after changing .solid */ 462 463 void(entity e, string m) setmodel = #3; /* 464 Looks up m in the model precache list, and sets both e.model and e.modelindex to match. BSP models will set e.mins and e.maxs accordingly, other models depend upon the value of sv_gameplayfix_setmodelrealbox - for compatibility you should always call setsize after all pickups or non-bsp models. Also relinks collision state. */ 465 466 void(entity e, vector min, vector max) setsize = #4; /* 467 Sets the e's mins and maxs fields. Also relinks collision state, which sets absmin and absmax too. */ 468 469 float() random = #7; /* 470 Returns a random value between 0 and 1. Be warned, this builtin can return 1 in most engines, which can break arrays. */ 471 472 void(entity e, float chan, string samp, float vol, float atten, optional float speedpct, optional float flags) sound = #8; /* 473 Starts a sound centered upon the given entity. 474 chan is the entity sound channel to use, channel 0 will allow you to mix many samples at once, others will replace the old sample 475 'samp' must have been precached first 476 if specified, 'speedpct' should normally be around 100 (or =0), 200 for double speed or 50 for half speed. 477 flags&1 means the sound should be sent reliably. */ 478 479 vector(vector v) normalize = #9; /* 480 Shorten or lengthen a direction vector such that it is only one quake unit long. */ 481 482 void(string e) error = #10; /* 483 Ends the game with an easily readable error message. */ 484 485 void(string e) objerror = #11; /* 486 Displays a non-fatal easily readable error message concerning the self entity, including a field dump. self will be removed! */ 487 488 float(vector v) vlen = #12; /* 489 Returns the square root of the dotproduct of a vector with itself. Or in other words the length of a distance vector, in quake units. */ 490 491 float(vector v, optional entity reference) vectoyaw = #13; /* 492 Given a direction vector, returns the yaw angle in which that direction vector points. If an entity is passed, the yaw angle will be relative to that entity's gravity direction. */ 493 494 entity() spawn = #14; /* 495 Adds a brand new entity into the world! Hurrah, you're now a parent! */ 496 497 void(entity e) remove = #15; /* 498 Destroys the given entity and clears some limited fields (including model, modelindex, solid, classname). Any references to the entity following the call are an error. After two seconds, the entity will be reused, in the interim you can unfortunatly still read its fields to see if the reference is no longer valid. */ 499 500 void(vector v1, vector v2, float flags, entity ent) traceline = #16; /* 501 Traces an infinitely thin line through the world from v1 towards v2. 502 Will not collide with ent, ent.owner, or any entity who's owner field refers to ent. 503 There are no side effects beyond the trace_* globals being written. 504 flags&MOVE_NOMONSTERS will not impact on non-bsp entities. 505 flags&MOVE_MISSILE will impact with increased size. 506 flags&MOVE_HITMODEL will impact upon model meshes, instead of their bounding boxes. 507 flags&MOVE_TRIGGERS will also stop on triggers 508 flags&MOVE_EVERYTHING will stop if it hits anything, even non-solid entities. 509 flags&MOVE_LAGGED will backdate entity positions for the purposes of this builtin according to the indicated player ent's latency, to provide lag compensation. */ 510 511 entity(entity start, .string fld, string match) find = #18; /* 512 Scan for the next entity with a given field set to the given 'match' value. start should be either world, or the previous entity that was found. Returns world on failure/if there are no more. */ 513 514 string(string s) precache_sound = #19; /* 515 Precaches a sound, making it known to clients and loading it from disk. This builtin (strongly) should be called during spawn functions. This builtin must be called for the sound before the sound builtin is called, or it might not even be heard. */ 516 517 string(string s) precache_model = #20; /* 518 Precaches a model, making it known to clients and loading it from disk if it has a .bsp extension. This builtin (strongly) should be called during spawn functions. This must be called for each model name before setmodel may use that model name. 519 Modelindicies precached in SSQC will always be positive. CSQC precaches will be negative if they are not also on the server. */ 520 521 entity(vector org, float rad) findradius = #22; /* 522 Finds all entities within a distance of the 'org' specified. One entity is returned directly, while other entities are returned via that entity's .chain field. */ 523 524 void(string s, ...) dprint = #25; /* 525 NQ: Prints the given message on the server's console, but only if the developer cvar is set. Arguments will be concatenated into a single message. */ 526 527 void(string s, ...) dprint = #25; /* 528 QW: Unconditionally prints the given message on the server's console. Arguments will be concatenated into a single message. */ 529 530 string(float val) ftos = #26; /* 531 Returns a tempstring containing a representation of the given float. Precision depends upon engine. */ 532 533 string(vector val) vtos = #27; /* 534 Returns a tempstring containing a representation of the given vector. Precision depends upon engine. */ 535 536 void() coredump = #28; /* 537 Writes out a coredump. This contains stack, globals, and field info for all ents. This can be handy for debugging. */ 538 539 void() traceon = #29; /* 540 Enables tracing. This may be spammy, slow, and stuff. Set debugger 1 in order to use fte's qc debugger. */ 541 542 void() traceoff = #30; /* 543 Disables tracing again. */ 544 545 void(entity e) eprint = #31; /* 546 Debugging builtin that prints all fields of the given entity to the console. */ 547 548 float(float yaw, float dist, optional float settraceglobals) walkmove = #32; /* 549 Attempt to walk the entity at a given angle for a given distance. 550 if settraceglobals is set, the trace_* globals will be set, showing the results of the movement. 551 This function will trigger touch events. */ 552 553 float() droptofloor = #34; /* 554 Instantly moves the entity downwards until it hits the ground. If the entity would need to drop more than 'pr_droptofloorunits' quake units, its position will be considered invalid and the builtin will abort. */ 555 556 void(float lightstyle, string stylestring, optional vector rgb) lightstyle = #35; /* 557 Specifies an auto-animating string that specifies the light intensity for entities using that lightstyle. 558 a is off, z is fully lit. Should be lower case only. 559 rgb will recolour all lights using that lightstyle. */ 560 561 float(float) rint = #36; /* 562 Rounds the given float up or down to the closest integeral value. X.5 rounds away from 0 */ 563 564 float(float) floor = #37; /* 565 Rounds the given float downwards, even when negative. */ 566 567 float(float) ceil = #38; /* 568 Rounds the given float upwards, even when negative. */ 569 570 float(entity ent) checkbottom = #40; /* 571 Expensive checks to ensure that the entity is actually sitting on something solid, returns true if it is. */ 572 573 float(vector pos) pointcontents = #41; /* 574 Checks the given point to see what is there. Returns one of the SOLID_* constants. Just because a spot is empty does not mean that the player can stand there due to the size of the player - use tracebox for such tests. */ 575 576 float(float) fabs = #43; /* 577 Removes the sign of the float, making it positive if it is negative. */ 578 579 float(string) cvar = #45; /* 580 Returns the numeric value of the named cvar */ 581 582 void(string, ...) localcmd = #46; /* 583 Adds the string to the console command queue. Commands will not be executed immediately, but rather at the start of the following frame. */ 584 585 entity(entity) nextent = #47; /* 586 Returns the following entity. Skips over removed entities. Returns world when passed the last valid entity. */ 587 588 void(vector pos, vector dir, float colour, float count) particle = #48; /* 589 Spawn 'count' particles around 'pos' moving in the direction 'dir', with a palette colour index between 'colour' and 'colour+8'. */ 590 591 #define ChangeYaw changeyaw 592 void() changeyaw = #49; /* 593 Changes the self.angles_y field towards self.ideal_yaw by up to self.yawspeed. */ 594 595 vector(vector fwd, optional vector up) vectoangles = #51; /* 596 Returns the angles required to orient an entity to look in the given direction. The 'up' argument is required if you wish to set a roll angle, otherwise it will be limited to just monster-style turning. */ 597 598 float(float angle) sin = #60; /* Part of DP_QC_SINCOSSQRTPOW*/ 599 float(float angle) cos = #61; /* Part of DP_QC_SINCOSSQRTPOW*/ 600 float(float value) sqrt = #62; /* Part of DP_QC_SINCOSSQRTPOW*/ 601 void(entity ent) changepitch = #63; /* Part of DP_QC_CHANGEPITCH*/ 602 void(entity ent, entity ignore) tracetoss = #64; 603 string(entity ent) etos = #65; /* Part of DP_QC_ETOS*/ 604 void(float step) movetogoal = #67; 605 string(string s) precache_file = #68; /* 606 This builtin does nothing. It was used only as a hint for pak generation. */ 607 608 void(entity e) makestatic = #69; /* 609 Sends a copy of the entity's renderable fields to all clients, and REMOVES the entity, preventing further changes. This means it will be unmutable and non-solid. */ 610 611 void(string cvarname, string valuetoset) cvar_set = #72; /* 612 Instantly sets a cvar to the given string value. */ 613 614 void (vector pos, string samp, float vol, float atten) ambientsound = #74; 615 string(string str) precache_model2 = #75; 616 string(string str) precache_sound2 = #76; 617 string(string str) precache_file2 = #77; 618 float(string) stof = #81; /* Part of FRIK_FILE, FTE_STRINGS, QW_ENGINE, ZQ_QC_STRINGS*/ 619 void(vector start, vector mins, vector maxs, vector end, float nomonsters, entity ent) tracebox = #90; /* Part of DP_QC_TRACEBOX 620 Exactly like traceline, but a box instead of a uselessly thin point. Acceptable sizes are limited by bsp format, q1bsp has strict acceptable size values. */ 621 622 vector() randomvec = #91; /* Part of DP_QC_RANDOMVEC 623 Returns a vector with random values. Each axis is independantly a value between -1 and 1 inclusive. */ 624 625 vector(vector org) getlight = #92; 626 void(string cvarname, string defaultvalue) registercvar = #93; /* Part of DP_REGISTERCVAR 627 Creates a new cvar on the fly. If it does not already exist, it will be given the specified value. If it does exist, this is a no-op. 628 This builtin has the limitation that it does not apply to configs or commandlines. Such configs will need to use the set or seta command causing this builtin to be a noop. 629 In engines that support it, you will generally find the autocvar feature easier and more efficient to use. */ 630 631 float(float a, float b, ...) min = #94; /* Part of DP_QC_MINMAXBOUND 632 Returns the lowest value of its arguments. */ 633 634 float(float a, float b, ...) max = #95; /* Part of DP_QC_MINMAXBOUND 635 Returns the highest value of its arguments. */ 636 637 float(float minimum, float val, float maximum) bound = #96; /* Part of DP_QC_MINMAXBOUND 638 Returns val, unless minimum is higher, or maximum is less. */ 639 640 float(float value, float exp) pow = #97; /* Part of DP_QC_SINCOSSQRTPOW*/ 641 entity(entity start, .float fld, float match) findfloat = #98; /* Part of DP_QC_FINDFLOAT 642 Equivelent to the find builtin, but instead of comparing strings, this builtin compares floats. This builtin requires multiple calls in order to scan all entities - set start to the previous call's return value. 643 world is returned when there are no more entities. */ 644 645 float(string extname) checkextension = #99; /* 646 Checks for an extension by its name (eg: checkextension("FRIK_FILE") says that its okay to go ahead and use strcat). 647 Use cvar("pr_checkextension") to see if this builtin exists. */ 648 649 float(float value) anglemod = #102; 650 filestream(string filename, float mode, optional float mmapminsize) fopen = #110; /* Part of FRIK_FILE*/ 651 void(filestream fhandle) fclose = #111; /* Part of FRIK_FILE*/ 652 string(filestream fhandle) fgets = #112; /* Part of FRIK_FILE*/ 653 void(filestream fhandle, string s, optional string s2, optional string s3, optional string s4, optional string s5, optional string s6, optional string s7) fputs = #113; /* Part of FRIK_FILE*/ 654 float(string s) strlen = #114; /* Part of FRIK_FILE, FTE_STRINGS, ZQ_QC_STRINGS*/ 655 string(string s1, optional string s2, ...) strcat = #115; /* Part of FRIK_FILE, FTE_STRINGS, ZQ_QC_STRINGS*/ 656 string(string s, float start, float length) substring = #116; /* Part of FRIK_FILE, FTE_STRINGS, ZQ_QC_STRINGS*/ 657 vector(string s) stov = #117; /* Part of FRIK_FILE, FTE_STRINGS, ZQ_QC_STRINGS*/ 658 string(string s, ...) strzone = #118; /* Part of FRIK_FILE, FTE_STRINGS, ZQ_QC_STRINGS*/ 659 void(string s) strunzone = #119; /* Part of FRIK_FILE, FTE_STRINGS, ZQ_QC_STRINGS*/ 660 float(string modelname, optional float queryonly) getmodelindex = #200; /* 661 Acts as an alternative to precache_model(foo);setmodel(bar, foo); return bar.modelindex; 662 If queryonly is set and the model was not previously precached, the builtin will return 0 without needlessly precaching the model. */ 663 664 __variant(float prnum, string funcname, ...) externcall = #201; /* Part of FTE_MULTIPROGS 665 Directly call a function in a different/same progs by its name. 666 prnum=0 is the 'default' or 'main' progs. 667 prnum=-1 means current progs. 668 prnum=-2 will scan through the active progs and will use the first it finds. */ 669 670 float(string progsname) addprogs = #202; /* Part of FTE_MULTIPROGS 671 Loads an additional .dat file into the current qcvm. The returned handle can be used with any of the externcall/externset/externvalue builtins. 672 There are cvars that allow progs to be loaded automatically. */ 673 674 __variant(float prnum, string varname) externvalue = #203; /* Part of FTE_MULTIPROGS 675 Reads a global in the named progs by the name of that global. 676 prnum=0 is the 'default' or 'main' progs. 677 prnum=-1 means current progs. 678 prnum=-2 will scan through the active progs and will use the first it finds. */ 679 680 void(float prnum, __variant newval, string varname) externset = #204; /* Part of FTE_MULTIPROGS 681 Sets a global in the named progs by name. 682 prnum=0 is the 'default' or 'main' progs. 683 prnum=-1 means current progs. 684 prnum=-2 will scan through the active progs and will use the first it finds. */ 685 686 float(string input, string token) instr = #206; /* Part of FTE_MULTIPROGS 687 Returns substring(input, strstrpos(input, token), -1), or the null string if token was not found in input. You're probably better off using strstrpos. */ 688 689 void(entity portal, float state) openportal = #207; /* 690 Opens or closes the portals associated with a door or some such on q2 or q3 maps. On Q2BSPs, the entity should be the 'func_areaportal' entity - its style field will say which portal to open. On Q3BSPs, the entity is the door itself, the portal will be determined by the two areas found from a preceding setorigin call. */ 691 692 void(optional __variant ret) abort = #211; /* Part of FTE_MULTITHREADED 693 QC execution is aborted. Parent QC functions on the stack will be skipped, effectively this forces all QC functions to 'return ret' until execution returns to the engine. If ret is ommited, it is assumed to be 0. */ 694 695 void(vector org, vector dmin, vector dmax, float colour, float effect, float count) particle2 = #215; /* Part of FTE_HEXEN2*/ 696 void(vector org, vector box, float colour, float effect, float count) particle3 = #216; /* Part of FTE_HEXEN2*/ 697 void(vector org, float radius, float colour, float effect, float count) particle4 = #217; /* Part of FTE_HEXEN2*/ 698 float(float number, float quantity) bitshift = #218; /* Part of EXT_BITSHIFT*/ 699 void(vector pos) te_lightningblood = #219; /* Part of FTE_TE_STANDARDEFFECTBUILTINS*/ 700 float(string s1, string sub, optional float startidx) strstrofs = #221; /* Part of FTE_STRINGS 701 Returns the 0-based offset of sub within the s1 string, or -1 if sub is not in s1. 702 If startidx is set, this builtin will ignore matches before that 0-based offset. */ 703 704 float(string str, float index) str2chr = #222; /* Part of FTE_STRINGS 705 Retrieves the character value at offset 'index'. */ 706 707 string(float chr, ...) chr2str = #223; /* Part of FTE_STRINGS 708 The input floats are considered character values, and are concatenated. */ 709 710 string(float ccase, float redalpha, float redchars, string str, ...) strconv = #224; /* Part of FTE_STRINGS 711 Converts quake chars in the input string amongst different representations. 712 ccase specifies the new case for letters. 713 0: not changed. 714 1: forced to lower case. 715 2: forced to upper case. 716 redalpha and redchars switch between colour ranges. 717 0: no change. 718 1: Forced white. 719 2: Forced red. 720 3: Forced gold(low) (numbers only). 721 4: Forced gold (high) (numbers only). 722 5+6: Forced to white and red alternately. 723 You should not use this builtin in combination with UTF-8. */ 724 725 string(float pad, string str1, ...) strpad = #225; /* Part of FTE_STRINGS 726 Pads the string with spaces, to ensure its a specific length (so long as a fixed-width font is used, anyway). If pad is negative, the spaces are added on the left. If positive the padding is on the right. */ 727 728 string(infostring old, string key, string value) infoadd = #226; /* Part of FTE_STRINGS 729 Returns a new tempstring infostring with the named value changed (or added if it was previously unspecified). Key and value may not contain the \ character. */ 730 731 string(infostring info, string key) infoget = #227; /* Part of FTE_STRINGS 732 Reads a named value from an infostring. The returned value is a tempstring */ 733 734 #define strcmp strncmp 735 float(string s1, string s2, optional float len, optional float s1ofs, optional float s2ofs) strncmp = #228; /* Part of FTE_STRINGS 736 Compares up to 'len' chars in the two strings. s1ofs allows you to treat s2 as a substring to compare against, or should be 0. 737 Returns 0 if the two strings are equal, a negative value if s1 appears numerically lower, and positive if s1 appears numerically higher. */ 738 739 float(string s1, string s2) strcasecmp = #229; /* Part of FTE_STRINGS 740 Compares the two strings without case sensitivity. 741 Returns 0 if they are equal. The sign of the return value may be significant, but should not be depended upon. */ 742 743 float(string s1, string s2, float len, optional float s1ofs, optional float s2ofs) strncasecmp = #230; /* Part of FTE_STRINGS 744 Compares up to 'len' chars in the two strings without case sensitivity. s1ofs allows you to treat s2 as a substring to compare against, or should be 0. 745 Returns 0 if they are equal. The sign of the return value may be significant, but should not be depended upon. */ 746 747 void() calltimeofday = #231; /* Part of FTE_CALLTIMEOFDAY 748 Asks the engine to instantly call the qc's 'timeofday' function, before returning. For compatibility with mvdsv. 749 timeofday should have the prototype: void(float secs, float mins, float hour, float day, float mon, float year, string strvalue) 750 The strftime builtin is more versatile and less weird. */ 751 752 void(vector angle) rotatevectorsbyangle = #235; 753 void(vector fwd, vector right, vector up) rotatevectorsbyvectors = #236; 754 float(float mdlindex, string skinname) skinforname = #237; 755 float(string shadername, optional string defaultshader, ...) shaderforname = #238; /* Part of FTE_FORCESHADER 756 Caches the named shader and returns a handle to it. 757 If the shader could not be loaded from disk (missing file or ruleset_allow_shaders 0), it will be created from the 'defaultshader' string if specified, or a 'skin shader' default will be used. 758 defaultshader if not empty should include the outer {} that you would ordinarily find in a shader. */ 759 760 void(vector org, optional float count) te_bloodqw = #239; /* Part of FTE_TE_STANDARDEFFECTBUILTINS*/ 761 float(vector viewpos, entity entity) checkpvs = #240; /* Part of FTE_QC_CHECKPVS*/ 762 vector(entity ent, float tagnum) rotatevectorsbytag = #244; 763 int(string) stoi = #259; /* Part of FTE_QC_INTCONV 764 Converts the given string into an integer. Base 8, 10, or 16 is determined based upon the format of the string. */ 765 766 string(int) itos = #260; /* Part of FTE_QC_INTCONV 767 Converts the passed integer into a base10 string. */ 768 769 int(string) stoh = #261; /* Part of FTE_QC_INTCONV 770 Reads a base-16 string (with or without 0x prefix) as an integer. Bugs out if given a base 8 or base 10 string. :P */ 771 772 string(int) htos = #262; /* Part of FTE_QC_INTCONV 773 Formats an integer as a base16 string, with leading 0s and no prefix. Always returns 8 characters. */ 774 775 float(float modlindex, optional float useabstransforms) skel_create = #263; /* Part of FTE_CSQC_SKELETONOBJECTS 776 Allocates a new uninitiaised skeletal object, with enough bone info to animate the given model. 777 eg: self.skeletonobject = skel_create(self.modelindex); */ 778 779 float(float skel, entity ent, float modelindex, float retainfrac, float firstbone, float lastbone, optional float addfrac) skel_build = #264; /* Part of FTE_CSQC_SKELETONOBJECTS 780 Animation data (according to the entity's frame info) is pulled from the specified model and blended into the specified skeletal object. 781 If retainfrac is set to 0 on the first call and 1 on the others, you can blend multiple animations together according to the addfrac value. The final weight should be 1. Other values will result in scaling and/or other weirdness. You can use firstbone and lastbone to update only part of the skeletal object, to allow legs to animate separately from torso, use 0 for both arguments to specify all, as bones are 1-based. */ 782 783 float(float skel) skel_get_numbones = #265; /* Part of FTE_CSQC_SKELETONOBJECTS 784 Retrives the number of bones in the model. The valid range is 1<=bone<=numbones. */ 785 786 string(float skel, float bonenum) skel_get_bonename = #266; /* Part of FTE_CSQC_SKELETONOBJECTS 787 Retrieves the name of the specified bone. Mostly only for debugging. */ 788 789 float(float skel, float bonenum) skel_get_boneparent = #267; /* Part of FTE_CSQC_SKELETONOBJECTS 790 Retrieves which bone this bone's position is relative to. Bone 0 refers to the entity's position rather than an actual bone */ 791 792 float(float skel, string tagname) skel_find_bone = #268; /* Part of FTE_CSQC_SKELETONOBJECTS 793 Finds a bone by its name, from the model that was used to create the skeletal object. */ 794 795 vector(float skel, float bonenum) skel_get_bonerel = #269; /* Part of FTE_CSQC_SKELETONOBJECTS 796 Gets the bone position and orientation relative to the bone's parent. Return value is the offset, and v_forward, v_right, v_up contain the orientation. */ 797 798 vector(float skel, float bonenum) skel_get_boneabs = #270; /* Part of FTE_CSQC_SKELETONOBJECTS 799 Gets the bone position and orientation relative to the entity. Return value is the offset, and v_forward, v_right, v_up contain the orientation. 800 Use gettaginfo for world coord+orientation. */ 801 802 void(float skel, float bonenum, vector org, optional vector fwd, optional vector right, optional vector up) skel_set_bone = #271; /* Part of FTE_CSQC_SKELETONOBJECTS 803 Sets a bone position relative to its parent. If the orientation arguments are not specified, v_forward+v_right+v_up are used instead. */ 804 805 void(float skel, float bonenum, vector org, optional vector fwd, optional vector right, optional vector up) skel_mul_bone = #272; /* Part of FTE_CSQC_SKELETONOBJECTS 806 Transforms a single bone by a matrix. You can use makevectors to generate a rotation matrix from an angle. */ 807 808 void(float skel, float startbone, float endbone, vector org, optional vector fwd, optional vector right, optional vector up) skel_mul_bones = #273; /* Part of FTE_CSQC_SKELETONOBJECTS 809 Transforms an entire consecutive range of bones by a matrix. You can use makevectors to generate a rotation matrix from an angle, but you'll probably want to divide the angle by the number of bones. */ 810 811 void(float skeldst, float skelsrc, float startbone, float entbone) skel_copybones = #274; /* Part of FTE_CSQC_SKELETONOBJECTS 812 Copy bone data from one skeleton directly into another. */ 813 814 void(float skel) skel_delete = #275; /* Part of FTE_CSQC_SKELETONOBJECTS 815 Deletes a skeletal object. The actual delete is delayed, allowing the skeletal object to be deleted in an entity's predraw function yet still be valid by the time the addentity+renderscene builtins need it. Also uninstanciates any ragdoll currently in effect on the skeletal object. */ 816 817 float(float modidx, string framename) frameforname = #276; /* Part of FTE_CSQC_SKELETONOBJECTS 818 Looks up a framegroup from a model by name, avoiding the need for hardcoding. Returns -1 on error. */ 819 820 float(float modidx, float framenum) frameduration = #277; /* Part of FTE_CSQC_SKELETONOBJECTS 821 Retrieves the duration (in seconds) of the specified framegroup. */ 822 823 void(float action, optional vector pos, optional float radius, optional float quant, ...) terrain_edit = #278; /* 824 Realtime terrain editing. Actions are the TEREDIT_ constants. */ 825 826 void() touchtriggers = #279; /* 827 Triggers a touch events between self and every entity that it is in contact with. This should typically just be the triggers touch functions. */ 828 829 float(entity skelent, string dollcmd, float animskel) skel_ragupdate = #281; /* 830 Updates the skeletal object attached to the entity according to its origin and other properties. 831 if animskel is non-zero, the ragdoll will animate towards the bone state in the animskel skeletal object, otherwise they will pick up the model's base pose which may not give nice results. 832 If dollcmd is not set, the ragdoll will update (this should be done each frame). 833 If the doll is updated without having a valid doll, the model's default .doll will be instanciated. 834 commands: 835 doll foo.doll : sets up the entity to use the named doll file 836 dollstring TEXT : uses the doll file directly embedded within qc, with that extra prefix. 837 cleardoll : uninstanciates the doll without destroying the skeletal object. 838 animate 0.5 : specifies the strength of the ragdoll as a whole 839 animatebody somebody 0.5 : specifies the strength of the ragdoll on a specific body (0 will disable ragdoll animations on that body). 840 enablejoint somejoint 1 : enables (or disables) a joint. Disabling joints will allow the doll to shatter. */ 841 842 float*(float skel) skel_mmap = #282; /* 843 Map the bones in VM memory. They can then be accessed via pointers. Each bone is 12 floats, the four vectors interleaved (sadly). */ 844 845 void(entity ent, float bonenum, vector org, optional vector angorfwd, optional vector right, optional vector up) skel_set_bone_world = #283; /* 846 Sets the world position of a bone within the given entity's attached skeletal object. The world position is dependant upon the owning entity's position. If no orientation argument is specified, v_forward+v_right+v_up are used for the orientation instead. If 1 is specified, it is understood as angles. If 3 are specified, they are the forawrd/right/up vectors to use. */ 847 848 string(float modidx, float framenum) frametoname = #284; 849 string(float modidx, float skin) skintoname = #285; 850 float(float resourcetype, float tryload, string resourcename) resourcestatus = #286; /* 851 resourcetype must be one of the RESTYPE_ constants. Returns one of the RESSTATE_ constants. Tryload 0 is a query only. Tryload 1 will attempt to reload the content if it was flushed. */ 852 853 hashtable(float tabsize, optional float defaulttype) hash_createtab = #287; /* Part of FTE_QC_HASHTABLES 854 Creates a hash table object with at least 'tabsize' slots. hash table with index 0 is a game-persistant table and will NEVER be returned by this builtin (except as an error return). */ 855 856 void(hashtable table) hash_destroytab = #288; /* Part of FTE_QC_HASHTABLES 857 Destroys a hash table object. */ 858 859 void(hashtable table, string name, __variant value, optional float typeandflags) hash_add = #289; /* Part of FTE_QC_HASHTABLES 860 Adds the given key with the given value to the table. 861 If flags&HASH_REPLACE, the old value will be removed, if not set then multiple values may be added for a single key, they won't overwrite. 862 The type argument describes how the value should be stored and saved to files. While you can claim that all variables are just vectors, being more precise can result in less issues with tempstrings or saved games. */ 863 864 __variant(hashtable table, string name, optional __variant deflt, optional float requiretype, optional float index) hash_get = #290; /* Part of FTE_QC_HASHTABLES 865 looks up the specified key name in the hash table. returns deflt if key was not found. If stringsonly=1, the return value will be in the form of a tempstring, otherwise it'll be the original value argument exactly as it was. If requiretype is specified, then values not of the specified type will be ignored. Hurrah for multiple types with the same name. */ 866 867 __variant(hashtable table, string name) hash_delete = #291; /* Part of FTE_QC_HASHTABLES 868 removes the named key. returns the value of the object that was destroyed, or 0 on error. */ 869 870 string(hashtable table, float idx) hash_getkey = #292; /* Part of FTE_QC_HASHTABLES 871 gets some random key name. add+delete can change return values of this, so don't blindly increment the key index if you're removing all. */ 872 873 float(string name) checkcommand = #294; /* Part of FTE_QC_CHECKCOMMAND 874 Checks to see if the supplied name is a valid command, cvar, or alias. Returns 0 if it does not exist. */ 875 876 string(string s) argescape = #295; /* 877 Marks up a string so that it can be reliably tokenized as a single argument later. */ 878 879 void() clearscene = #300; /* 880 Forgets all rentities, polygons, and temporary dlights. Resets all view properties to their default values. */ 881 882 void(float mask) addentities = #301; /* 883 Walks through all entities effectively doing this: 884 if (ent.drawmask&mask){ ent.predaw(); if (wasremoved(ent)||(ent.renderflags&RF_NOAUTOADD))continue; addentity(ent); } 885 If mask&MASK_DELTA, non-csqc entities, particles, and related effects will also be added to the rentity list. 886 If mask&MASK_STDVIEWMODEL then the default view model will also be added. */ 887 888 void(entity ent) addentity = #302; /* 889 Copies the entity fields into a new rentity for later rendering via addscene. */ 890 891 #define setviewprop setproperty 892 float(float property, ...) setproperty = #303; /* 893 Allows you to override default view properties like viewport, fov, and whether the engine hud will be drawn. Different VF_ values have slightly different arguments, some are vectors, some floats. */ 894 895 void() renderscene = #304; /* 896 Draws all entities, polygons, and particles on the rentity list (which were added via addentities or addentity), using the various view properties set via setproperty. There is no ordering dependancy. 897 The scene must generally be cleared again before more entities are added, as entities will persist even over to the next frame. 898 You may call this builtin multiple times per frame, but should only be called from CSQC_UpdateView. */ 899 900 float(vector org, float radius, vector lightcolours, optional float style, optional string cubemapname, optional float pflags) dynamiclight_add = #305; /* 901 Adds a temporary dlight, ready to be drawn via addscene. Cubemap orientation will be read from v_forward/v_right/v_up. */ 902 903 void(string texturename, optional float flags) R_BeginPolygon = #306; /* 904 Specifies the shader to use for the following polygons, along with optional flags. 905 If flags&4, the polygon will be drawn as soon as the EndPolygon call is made, rather than waiting for renderscene. This allows complex 2d effects. */ 906 907 void(vector org, vector texcoords, vector rgb, float alpha) R_PolygonVertex = #307; /* 908 Specifies a polygon vertex with its various properties. */ 909 910 void() R_EndPolygon = #308; /* 911 Ends the current polygon. At least 3 verticies must have been specified. You do not need to call beginpolygon if you wish to draw another polygon with the same shader. */ 912 913 #define getviewprop getproperty 914 __variant(float property) getproperty = #309; /* 915 Retrieve a currently-set (typically view) property, allowing you to read the current viewport or other things. Due to cheat protection, certain values may be unretrievable. */ 916 917 vector (vector v) unproject = #310; /* 918 Transform a 2d screen-space point (with depth) into a 3d world-space point, according the various origin+angle+fov etc settings set via setproperty. */ 919 920 vector (vector v) project = #311; /* 921 Transform a 3d world-space point into a 2d screen-space point, according the various origin+angle+fov etc settings set via setproperty. */ 922 923 void(float width, vector pos1, vector pos2, vector rgb, float alpha, optional float drawflag) drawline = #315; /* 924 Draws a 2d line between the two 2d points. */ 925 926 float(string name) iscachedpic = #316; /* 927 Checks to see if the image is currently loaded. Engines might lie, or cache between maps. */ 928 929 string(string name, optional float trywad) precache_pic = #317; /* 930 Forces the engine to load the named image. If trywad is specified, the specified name must any lack path and extension. */ 931 932 #define draw_getimagesize drawgetimagesize 933 vector(string picname) drawgetimagesize = #318; /* 934 Returns the dimensions of the named image. Images specified with .lmp should give the original .lmp's dimensions even if texture replacements use a different resolution. */ 935 936 void(string name) freepic = #319; /* 937 Tells the engine that the image is no longer needed. The image will appear to be new the next time its needed. */ 938 939 float(vector position, float character, vector size, vector rgb, float alpha, optional float drawflag) drawcharacter = #320; /* 940 Draw the given quake character at the given position. 941 If flag&4, the function will consider the char to be a unicode char instead (or display as a ? if outside the 32-127 range). 942 size should normally be something like '8 8 0'. 943 rgb should normally be '1 1 1' 944 alpha normally 1. 945 Software engines may assume the named defaults. 946 Note that ALL text may be rescaled on the X axis due to variable width fonts. The X axis may even be ignored completely. */ 947 948 float(vector position, string text, vector size, vector rgb, float alpha, optional float drawflag) drawrawstring = #321; /* 949 Draws the specified string without using any markup at all, even in engines that support it. 950 If UTF-8 is globally enabled in the engine, then that encoding is used (without additional markup), otherwise it is raw quake chars. 951 Software engines may assume a size of '8 8 0', rgb='1 1 1', alpha=1, flag&3=0, but it is not an error to draw out of the screen. */ 952 953 float(vector position, string pic, vector size, vector rgb, float alpha, optional float drawflag) drawpic = #322; /* 954 Draws an shader within the given 2d screen box. Software engines may omit support for rgb+alpha, but must support rescaling, and must clip to the screen without crashing. */ 955 956 float(vector position, vector size, vector rgb, float alpha, optional float drawflag) drawfill = #323; /* 957 Draws a solid block over the given 2d box, with given colour, alpha, and blend mode (specified via flags). 958 flags&3=0 simple blend. 959 flags&3=1 additive blend */ 960 961 void(float x, float y, float width, float height) drawsetcliparea = #324; /* 962 Specifies a 2d clipping region (aka: scissor test). 2d draw calls will all be clipped to this 2d box, the area outside will not be modified by any 2d draw call (even 2d polygons). */ 963 964 void(void) drawresetcliparea = #325; /* 965 Reverts the scissor/clip area to the whole screen. */ 966 967 float(vector position, string text, vector size, vector rgb, float alpha, float drawflag) drawstring = #326; /* 968 Draws a string, interpreting markup and recolouring as appropriate. */ 969 970 float(string text, float usecolours, optional vector fontsize) stringwidth = #327; /* 971 Calculates the width of the screen in virtual pixels. If usecolours is 1, markup that does not affect the string width will be ignored. Will always be decoded as UTF-8 if UTF-8 is globally enabled. 972 If the char size is not specified, '8 8 0' will be assumed. */ 973 974 void(vector pos, vector sz, string pic, vector srcpos, vector srcsz, vector rgb, float alpha, optional float drawflag) drawsubpic = #328; /* 975 Draws a rescaled subsection of an image to the screen. */ 976 977 float(float stnum) getstati = #330; /* 978 Retrieves the numerical value of the given EV_INTEGER or EV_ENTITY stat (converted to a float). */ 979 980 #define getstatbits getstatf 981 float(float stnum, optional float firstbit, optional float bitcount) getstatf = #331; /* 982 Retrieves the numerical value of the given EV_FLOAT stat. If firstbit and bitcount are specified, retrieves the upper bits of the STAT_ITEMS stat. */ 983 984 string(float firststnum) getstats = #332; /* 985 Retrieves the value of the given EV_STRING stat, as a tempstring. 986 Older engines may use 4 consecutive integer stats, with a limit of 15 chars (yes, really. 15.), but FTE QuakeWorld uses a separate namespace for string stats and has a much higher length limit. */ 987 988 void(entity e, float mdlindex) setmodelindex = #333; /* 989 Sets a model by precache index instead of by name. Otherwise identical to setmodel. */ 990 991 string(float mdlindex) modelnameforindex = #334; /* 992 Retrieves the name of the model based upon a precache index. This can be used to reduce csqc network traffic by enabling model matching. */ 993 994 float(string effectname) particleeffectnum = #335; /* 995 Precaches the named particle effect. If your effect name is of the form 'foo.bar' then particles/foo.cfg will be loaded by the client if foo.bar was not already defined. 996 Different engines will have different particle systems, this specifies the QC API only. */ 997 998 void(float effectnum, entity ent, vector start, vector end) trailparticles = #336; /* 999 Draws the given effect between the two named points. If ent is not world, distances will be cached in the entity in order to avoid framerate dependancies. The entity is not otherwise used. */ 1000 1001 void(float effectnum, vector origin, optional vector dir, optional float count) pointparticles = #337; /* 1002 Spawn a load of particles from the given effect at the given point traveling or aiming along the direction specified. The number of particles are scaled by the count argument. */ 1003 1004 void(string s, ...) cprint = #338; /* 1005 Print into the center of the screen just as ssqc's centerprint would appear. */ 1006 1007 void(string s, ...) print = #339; /* 1008 Unconditionally print on the local system's console, even in ssqc (doesn't care about the value of the developer cvar). */ 1009 1010 string(float keynum) keynumtostring = #340; /* 1011 Returns a hunam-readable name for the given keycode, as a tempstring. */ 1012 1013 float(string keyname) stringtokeynum = #341; /* 1014 Looks up the key name in the same way that the bind command would, returning the keycode for that key. */ 1015 1016 string(float keynum) getkeybind = #342; /* 1017 Finds the current binding for the given key (ignores modifiers like shift/alt/ctrl). */ 1018 1019 void(float usecursor, optional string cursorimage, optional vector hotspot, optional float scale) setcursormode = #343; /* 1020 Pass TRUE if you want the engine to release the mouse cursor (absolute input events + touchscreen mode). Pass FALSE if you want the engine to grab the cursor (relative input events + standard looking). If the image name is specified, the engine will use that image for a cursor (use an empty string to clear it again), in a way that will not conflict with the console. Images specified this way will be hardware accelerated, if supported by the platform/port. */ 1021 1022 vector() getmousepos = #344; /* 1023 Nasty convoluted DP extension. Typically returns deltas instead of positions. Use CSQC_InputEvent for such things in csqc mods. */ 1024 1025 float(float inputsequencenum) getinputstate = #345; /* 1026 Looks up an input frame from the log, setting the input_* globals accordingly. 1027 The sequence number range used for prediction should normally be servercommandframe < sequence <= clientcommandframe. 1028 The sequence equal to clientcommandframe will change between input frames. */ 1029 1030 void(float sens) setsensitivityscaler = #346; /* 1031 Temporarily scales the player's mouse sensitivity based upon something like zoom, avoiding potential cvar saving and thus corruption. */ 1032 1033 void(entity ent) runstandardplayerphysics = #347; /* 1034 Perform the engine's standard player movement prediction upon the given entity using the input_* globals to describe movement. */ 1035 1036 string(float playernum, string keyname) getplayerkeyvalue = #348; /* 1037 Look up a player's userinfo, to discover things like their name, topcolor, bottomcolor, skin, team, *ver. 1038 Also includes scoreboard info like frags, ping, pl, userid, entertime, as well as voipspeaking and voiploudness. */ 1039 1040 float() isdemo = #349; /* 1041 Returns if the client is currently playing a demo or not */ 1042 1043 float() isserver = #350; /* 1044 Returns if the client is acting as the server (aka: listen server) */ 1045 1046 void(vector origin, vector forward, vector right, vector up, optional float inwater) SetListener = #351; /* 1047 Sets the position of the view, as far as the audio subsystem is concerned. This should be called once per CSQC_UpdateView as it will otherwise revert to default. */ 1048 1049 void(string cmdname) registercommand = #352; /* 1050 Register the given console command, for easy console use. 1051 Console commands that are later used will invoke CSQC_ConsoleCommand. */ 1052 1053 float(entity ent) wasfreed = #353; /* 1054 Quickly check to see if the entity is currently free. This function is only valid during the two-second non-reuse window, after that it may give bad results. Try one second to make it more robust. */ 1055 1056 string(string key) serverkey = #354; /* 1057 Look up a key in the server's public serverinfo string */ 1058 1059 string(optional string resetstring) getentitytoken = #355; /* 1060 Grab the next token in the map's entity lump. 1061 If resetstring is not specified, the next token will be returned with no other sideeffects. 1062 If empty, will reset from the map before returning the first token, probably {. 1063 If not empty, will tokenize from that string instead. 1064 Always returns tempstrings. */ 1065 1066 float(string s) findfont = #356; /* 1067 Looks up a named font slot. Matches the actual font name as a last resort. */ 1068 1069 float(string fontname, string fontmaps, string sizes, float slot, optional float fix_scale, optional float fix_voffset) loadfont = #357; /* 1070 too convoluted for me to even try to explain correct usage. Try drawfont = loadfont("foo", "cour", "16", 0, 0, 0); to switch to the courier font, if you have the freetype2 library in windows.. */ 1071 1072 void(string evname, string evargs, ...) sendevent = #359; /* 1073 Invoke Cmd_evname_evargs in ssqc. evargs must be a string of initials refering to the types of the arguments to pass. v=vector, e=entity(.entnum field is sent), f=float, i=int. 6 arguments max - you can get more if you pack your floats into vectors. */ 1074 1075 float() readbyte = #360; 1076 float() readchar = #361; 1077 float() readshort = #362; 1078 float() readlong = #363; 1079 float() readcoord = #364; 1080 float() readangle = #365; 1081 string() readstring = #366; 1082 float() readfloat = #367; 1083 float() readentitynum = #368; 1084 float(string modelname, float(float isnew) updatecallback, float flags) deltalisten = #371; /* 1085 Specifies a per-modelindex callback to listen for engine-networking entity updates. Such entities are automatically interpolated by the engine (unless flags specifies not to). 1086 The various standard entity fields will be overwritten each frame before the updatecallback function is called. */ 1087 1088 __variant(float lno, float fld) dynamiclight_get = #372; /* 1089 Retrieves a property from the given dynamic/rt light. Return type depends upon the light field requested. */ 1090 1091 void(float lno, float fld, __variant value) dynamiclight_set = #373; /* 1092 Changes a property on the given dynamic/rt light. Value type depends upon the light field to be changed. */ 1093 1094 string(float efnum, float body) particleeffectquery = #374; /* 1095 Retrieves either the name or the body of the effect with the given number. The effect body is regenerated from internal state, and can be changed before being reapplied via the localcmd builtin. */ 1096 1097 void(string shadername, vector origin, vector up, vector side, vector rgb, float alpha) adddecal = #375; /* 1098 Adds a temporary clipped decal shader to the scene, centered at the given point with given orientation. Will be drawn by the next renderscene call, and freed by the next clearscene call. */ 1099 1100 void(entity e, string skinfilename, optional string skindata) setcustomskin = #376; /* 1101 Sets an entity's skin overrides. These are custom per-entity surface->shader lookups. The skinfilename/data should be in .skin format: 1102 surfacename,shadername - makes the named surface use the named shader 1103 replace "surfacename" "shadername" - same. 1104 compose "surfacename" "shader" "imagename@x,y:w,h?r,g,b,a" - compose a skin texture from multiple images. The texture is determined to be sufficient to hold the first named image, additional images can be named as extra tokens on the same line. Use a + at the end of the line to continue reading image tokens from the next line also, the named shader must use 'map $diffuse' to read the composed texture (compatible with the defaultskin shader). */ 1105 1106 __variant*(int size) memalloc = #384; /* Part of FTE_MEMALLOC 1107 Allocate an arbitary block of memory */ 1108 1109 void(__variant *ptr) memfree = #385; /* Part of FTE_MEMALLOC 1110 Frees a block of memory that was allocated with memfree */ 1111 1112 void(__variant *dst, __variant *src, int size) memcpy = #386; /* Part of FTE_MEMALLOC 1113 Copys memory from one location to another */ 1114 1115 void(__variant *dst, int val, int size) memfill8 = #387; /* Part of FTE_MEMALLOC 1116 Sets an entire block of memory to a specified value. Pretty much always 0. */ 1117 1118 __variant(__variant *dst, float ofs) memgetval = #388; /* 1119 Looks up the 32bit value stored at a pointer-with-offset. */ 1120 1121 void(__variant *dst, float ofs, __variant val) memsetval = #389; /* 1122 Changes the 32bit value stored at the specified pointer-with-offset. */ 1123 1124 __variant*(__variant *base, float ofs) memptradd = #390; /* 1125 Perform some pointer maths. Woo. */ 1126 1127 string(string conname, string field, optional string newvalue) con_getset = #391; /* Part of FTE_CSQC_ALTCONSOLES_WIP 1128 Reads or sets a property from a console object. The old value is returned. Iterrate through consoles with the 'next' field. Valid properties: title, name, next, unseen, markup, forceutf8, close, clear, hidden, linecount */ 1129 1130 void(string conname, string messagefmt, ...) con_printf = #392; /* Part of FTE_CSQC_ALTCONSOLES_WIP 1131 Prints onto a named console. */ 1132 1133 void(string conname, vector pos, vector size, float fontsize) con_draw = #393; /* Part of FTE_CSQC_ALTCONSOLES_WIP 1134 Draws the named console. */ 1135 1136 float(string conname, float inevtype, float parama, float paramb, float paramc) con_input = #394; /* Part of FTE_CSQC_ALTCONSOLES_WIP 1137 Forwards input events to the named console. Mouse updates should be absolute only. */ 1138 1139 void(entity from, entity to) copyentity = #400; /* Part of DP_QC_COPYENTITY*/ 1140 entity(.string field, string match) findchain = #402; /* Part of DP_QC_FINDCHAIN*/ 1141 entity(.float fld, float match) findchainfloat = #403; /* Part of DP_QC_FINDCHAINFLOAT*/ 1142 void(vector org, string modelname, float startframe, float endframe, float framerate) effect = #404; /* Part of DP_SV_EFFECT 1143 Spawns a self-animating sprite */ 1144 1145 void(vector org, vector dir, float count) te_blood = #405; /* Part of DP_TE_BLOOD*/ 1146 void(vector mincorner, vector maxcorner, float explosionspeed, float howmany) te_bloodshower = #406; /* Part of DP_TE_BLOODSHOWER*/ 1147 void(vector org, vector color) te_explosionrgb = #407; /* Part of DP_TE_EXPLOSIONRGB*/ 1148 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color, float gravityflag, float randomveljitter) te_particlecube = #408; /* Part of DP_TE_PARTICLECUBE*/ 1149 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlerain = #409; /* Part of _DP_TE_PARTICLERAIN*/ 1150 void(vector mincorner, vector maxcorner, vector vel, float howmany, float color) te_particlesnow = #410; /* Part of _DP_TE_PARTICLESNOW*/ 1151 void(vector org, vector vel, float howmany) te_spark = #411; /* Part of DP_TE_SPARK*/ 1152 void(vector org) te_gunshotquad = #412; /* Part of _DP_TE_QUADEFFECTS1*/ 1153 void(vector org) te_spikequad = #413; /* Part of _DP_TE_QUADEFFECTS1*/ 1154 void(vector org) te_superspikequad = #414; /* Part of _DP_TE_QUADEFFECTS1*/ 1155 void(vector org) te_explosionquad = #415; /* Part of _DP_TE_QUADEFFECTS1*/ 1156 void(vector org) te_smallflash = #416; /* Part of DP_TE_SMALLFLASH*/ 1157 void(vector org, float radius, float lifetime, vector color) te_customflash = #417; /* Part of DP_TE_CUSTOMFLASH*/ 1158 void(vector org, optional float count) te_gunshot = #418; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1159 void(vector org) te_spike = #419; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1160 void(vector org) te_superspike = #420; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1161 void(vector org) te_explosion = #421; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1162 void(vector org) te_tarexplosion = #422; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1163 void(vector org) te_wizspike = #423; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1164 void(vector org) te_knightspike = #424; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1165 void(vector org) te_lavasplash = #425; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1166 void(vector org) te_teleport = #426; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1167 void(vector org, float color, float colorlength) te_explosion2 = #427; /* Part of DP_TE_STANDARDEFFECTBUILTINS*/ 1168 void(entity own, vector start, vector end) te_lightning1 = #428; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1169 void(entity own, vector start, vector end) te_lightning2 = #429; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1170 void(entity own, vector start, vector end) te_lightning3 = #430; /* Part of DP_TE_STANDARDEFFECTBUILTINS, FTE_TE_STANDARDEFFECTBUILTINS*/ 1171 void(entity own, vector start, vector end) te_beam = #431; /* Part of DP_TE_STANDARDEFFECTBUILTINS*/ 1172 void(vector dir) vectorvectors = #432; /* Part of DP_QC_VECTORVECTORS*/ 1173 void(vector org) te_plasmaburn = #433; /* Part of _DP_TE_PLASMABURN*/ 1174 float(entity e, float s) getsurfacenumpoints = #434; /* Part of DP_QC_GETSURFACE*/ 1175 vector(entity e, float s, float n) getsurfacepoint = #435; /* Part of DP_QC_GETSURFACE*/ 1176 vector(entity e, float s) getsurfacenormal = #436; /* Part of DP_QC_GETSURFACE*/ 1177 string(entity e, float s) getsurfacetexture = #437; /* Part of DP_QC_GETSURFACE*/ 1178 float(entity e, vector p) getsurfacenearpoint = #438; /* Part of DP_QC_GETSURFACE*/ 1179 vector(entity e, float s, vector p) getsurfaceclippedpoint = #439; /* Part of DP_QC_GETSURFACE*/ 1180 float(string s) tokenize = #441; /* Part of KRIMZON_SV_PARSECLIENTCOMMAND*/ 1181 string(float n) argv = #442; /* Part of KRIMZON_SV_PARSECLIENTCOMMAND*/ 1182 void(entity e, entity tagentity, string tagname) setattachment = #443; /* Part of DP_GFX_QUAKE3MODELTAGS*/ 1183 searchhandle(string pattern, float caseinsensitive, float quiet) search_begin = #444; /* Part of DP_QC_FS_SEARCH 1184 initiate a filesystem scan based upon filenames. Be sure to call search_end on the returned handle. */ 1185 1186 void(searchhandle handle) search_end = #445; /* Part of DP_QC_FS_SEARCH*/ 1187 float(searchhandle handle) search_getsize = #446; /* Part of DP_QC_FS_SEARCH 1188 Retrieves the number of files that were found. */ 1189 1190 string(searchhandle handle, float num) search_getfilename = #447; /* Part of DP_QC_FS_SEARCH 1191 Retrieves name of one of the files that was found by the initial search. */ 1192 1193 string(string cvarname) cvar_string = #448; /* Part of DP_QC_CVAR_STRING*/ 1194 entity(entity start, .float fld, float match) findflags = #449; /* Part of DP_QC_FINDFLAGS*/ 1195 entity(.float fld, float match) findchainflags = #450; /* Part of DP_QC_FINDCHAINFLAGS*/ 1196 float(entity ent, string tagname) gettagindex = #451; /* Part of DP_MD3_TAGSINFO*/ 1197 vector(entity ent, float tagindex) gettaginfo = #452; /* Part of DP_MD3_TAGSINFO 1198 Obtains the current worldspace position+orientation of the bone or tag from the given entity. The return value is the world coord, v_forward, v_right, v_up are also set according to the bone/tag's orientation. */ 1199 1200 entity(float entnum) edict_num = #459; /* Part of DP_QC_EDICT_NUM*/ 1201 strbuf() buf_create = #460; /* Part of DP_QC_STRINGBUFFERS*/ 1202 void(strbuf bufhandle) buf_del = #461; /* Part of DP_QC_STRINGBUFFERS*/ 1203 float(strbuf bufhandle) buf_getsize = #462; /* Part of DP_QC_STRINGBUFFERS*/ 1204 void(strbuf bufhandle_from, strbuf bufhandle_to) buf_copy = #463; /* Part of DP_QC_STRINGBUFFERS*/ 1205 void(strbuf bufhandle, float sortprefixlen, float backward) buf_sort = #464; /* Part of DP_QC_STRINGBUFFERS*/ 1206 string(strbuf bufhandle, string glue) buf_implode = #465; /* Part of DP_QC_STRINGBUFFERS*/ 1207 string(strbuf bufhandle, float string_index) bufstr_get = #466; /* Part of DP_QC_STRINGBUFFERS*/ 1208 void(strbuf bufhandle, float string_index, string str) bufstr_set = #467; /* Part of DP_QC_STRINGBUFFERS*/ 1209 float(strbuf bufhandle, string str, float order) bufstr_add = #468; /* Part of DP_QC_STRINGBUFFERS*/ 1210 void(strbuf bufhandle, float string_index) bufstr_free = #469; /* Part of DP_QC_STRINGBUFFERS*/ 1211 float(float s) asin = #471; /* Part of DP_QC_ASINACOSATANATAN2TAN*/ 1212 float(float c) acos = #472; /* Part of DP_QC_ASINACOSATANATAN2TAN*/ 1213 float(float t) atan = #473; /* Part of DP_QC_ASINACOSATANATAN2TAN*/ 1214 float(float c, float s) atan2 = #474; /* Part of DP_QC_ASINACOSATANATAN2TAN*/ 1215 float(float a) tan = #475; /* Part of DP_QC_ASINACOSATANATAN2TAN*/ 1216 float(string s) strlennocol = #476; /* Part of DP_QC_STRINGCOLORFUNCTIONS*/ 1217 string(string s) strdecolorize = #477; /* Part of DP_QC_STRINGCOLORFUNCTIONS*/ 1218 string(float uselocaltime, string format, ...) strftime = #478; /* Part of DP_QC_STRFTIME*/ 1219 float(string s, string separator1, ...) tokenizebyseparator = #479; /* Part of DP_QC_TOKENIZEBYSEPARATOR*/ 1220 string(string s) strtolower = #480; /* Part of DP_QC_STRING_CASE_FUNCTIONS*/ 1221 string(string s) strtoupper = #481; /* Part of DP_QC_STRING_CASE_FUNCTIONS*/ 1222 string(string s) cvar_defstring = #482; /* Part of DP_QC_CVAR_DEFSTRING*/ 1223 void(vector origin, string sample, float volume, float attenuation) pointsound = #483; /* Part of DP_SV_POINTSOUND*/ 1224 string(string search, string replace, string subject) strreplace = #484; /* Part of DP_QC_STRREPLACE*/ 1225 string(string search, string replace, string subject) strireplace = #485; /* Part of DP_QC_STRREPLACE*/ 1226 vector(entity e, float s, float n, float a) getsurfacepointattribute = #486; /* Part of DP_QC_GETSURFACEPOINTATTRIBUTE*/ 1227 float(string name) gecko_create = #487; /* Part of DP_GECKO_SUPPORT*/ 1228 void(string name) gecko_destroy = #488; /* Part of DP_GECKO_SUPPORT*/ 1229 void(string name, string URI) gecko_navigate = #489; /* Part of DP_GECKO_SUPPORT*/ 1230 float(string name, float key, float eventtype) gecko_keyevent = #490; /* Part of DP_GECKO_SUPPORT*/ 1231 void(string name, float x, float y) gecko_mousemove = #491; /* Part of DP_GECKO_SUPPORT*/ 1232 void(string name, float w, float h) gecko_resize = #492; /* Part of DP_GECKO_SUPPORT*/ 1233 vector(string name) gecko_get_texture_extent = #493; /* Part of DP_GECKO_SUPPORT*/ 1234 float(float caseinsensitive, string s, ...) crc16 = #494; /* Part of DP_QC_CRC16*/ 1235 float(string name) cvar_type = #495; /* Part of DP_QC_CVAR_TYPE*/ 1236 float() numentityfields = #496; /* Part of DP_QC_ENTITYDATA*/ 1237 string(float fieldnum) entityfieldname = #497; /* Part of DP_QC_ENTITYDATA*/ 1238 float(float fieldnum) entityfieldtype = #498; /* Part of DP_QC_ENTITYDATA*/ 1239 string(float fieldnum, entity ent) getentityfieldstring = #499; /* Part of DP_QC_ENTITYDATA*/ 1240 float(float fieldnum, entity ent, string s) putentityfieldstring = #500; /* Part of DP_QC_ENTITYDATA*/ 1241 void(float effectindex, entity own, vector org_from, vector org_to, vector dir_from, vector dir_to, float countmultiplier, optional float flags) boxparticles = #502; 1242 string(string filename, optional float makereferenced) whichpack = #503; /* Part of DP_QC_WHICHPACK 1243 Returns the pak file name that contains the file specified. progs/player.mdl will generally return something like 'pak0.pak'. If makereferenced is true, clients will automatically be told that the returned package should be pre-downloaded and used, even if allow_download_refpackages is not set. */ 1244 1245 __variant(float entnum, float fieldnum) getentity = #504; /* 1246 Looks up fields from non-csqc-visible entities. The entity will need to be within the player's pvs. fieldnum should be one of the GE_ constants. */ 1247 1248 string(string in) uri_escape = #510; /* Part of DP_QC_URI_ESCAPE*/ 1249 string(string in) uri_unescape = #511; /* Part of DP_QC_URI_ESCAPE*/ 1250 float(entity ent) num_for_edict = #512; 1251 float(string uril, float id, optional string postmimetype, optional string postdata) uri_get = #513; /* Part of DP_QC_URI_GET 1252 uri_get() gets content from an URL and calls a callback "uri_get_callback" with it set as string; an unique ID of the transfer is returned 1253 returns 1 on success, and then calls the callback with the ID, 0 or the HTTP status code, and the received data in a string */ 1254 1255 float(string str) tokenize_console = #514; 1256 float(float idx) argv_start_index = #515; 1257 float(float idx) argv_end_index = #516; 1258 void(strbuf strbuf) buf_cvarlist = #517; 1259 string(string cvarname) cvar_description = #518; 1260 float(optional float timetype) gettime = #519; 1261 string(float keynum) keynumtostring_omgwtf = #520; 1262 string(string command, optional float bindmap) findkeysforcommand = #521; 1263 void(string s) loadfromdata = #529; /* 1264 Reads a set of entities from the given string. This string should have the same format as a .ent file or a saved game. Entities will be spawned as required. If you need to see the entities that were created, you should use parseentitydata instead. */ 1265 1266 void(string s) loadfromfile = #530; /* 1267 Reads a set of entities from the named file. This file should have the same format as a .ent file or a saved game. Entities will be spawned as required. If you need to see the entities that were created, you should use parseentitydata instead. */ 1268 1269 float(entity e, float channel) getsoundtime = #533; 1270 float(string sample) soundlength = #534; 1271 float(string filename, strbuf bufhandle) buf_loadfile = #535; 1272 float(filestream filehandle, strbuf bufhandle, optional float startpos, optional float numstrings) buf_writefile = #536; 1273 void(entity e, float physics_enabled) physics_enable = #540; /* 1274 Enable or disable the physics attached to a MOVETYPE_PHYSICS entity. Entities which have been disabled in this way will stop taking so much cpu time. */ 1275 1276 void(entity e, vector force, vector relative_ofs) physics_addforce = #541; /* 1277 Apply some impulse directional force upon a MOVETYPE_PHYSICS entity. */ 1278 1279 void(entity e, vector torque) physics_addtorque = #542; /* 1280 Apply some impulse rotational force upon a MOVETYPE_PHYSICS entity. */ 1281 1282 void(float trg) setmousetarget = #603; 1283 float() getmousetarget = #604; 1284 void(.../*, string funcname*/) callfunction = #605; /* 1285 Invokes the named function. The function name is always passed as the last parameter and must always be present. The others are passed to the named function as-is */ 1286 1287 void(filestream fh, entity e) writetofile = #606; /* 1288 Writes an entity's fields to the named frik_file file handle. */ 1289 1290 float(string s) isfunction = #607; 1291 vector(float vidmode, optional float forfullscreen) getresolution = #608; 1292 string(float keynum) keynumtostring_menu = #609; 1293 string(string command, optional float bindmap) findkeysforcommand_dp = #610; 1294 float(float type) gethostcachevalue = #611; /* Part of FTE_CSQC_SERVERBROWSER*/ 1295 string(float type, float hostnr) gethostcachestring = #612; /* Part of FTE_CSQC_SERVERBROWSER*/ 1296 void(entity e, string s) parseentitydata = #613; /* 1297 Reads a single entity's fields into an already-spawned entity. s should contain field pairs like in a saved game: {"foo1" "bar" "foo2" "5"} */ 1298 1299 float(string key) stringtokeynum_menu = #614; 1300 void() resethostcachemasks = #615; /* Part of FTE_CSQC_SERVERBROWSER*/ 1301 void(float mask, float fld, string str, float op) sethostcachemaskstring = #616; /* Part of FTE_CSQC_SERVERBROWSER*/ 1302 void(float mask, float fld, float num, float op) sethostcachemasknumber = #617; /* Part of FTE_CSQC_SERVERBROWSER*/ 1303 void() resorthostcache = #618; /* Part of FTE_CSQC_SERVERBROWSER*/ 1304 void(float fld, float descending) sethostcachesort = #619; /* Part of FTE_CSQC_SERVERBROWSER*/ 1305 void() refreshhostcache = #620; /* Part of FTE_CSQC_SERVERBROWSER*/ 1306 float(float fld, float hostnr) gethostcachenumber = #621; /* Part of FTE_CSQC_SERVERBROWSER*/ 1307 float(string key) gethostcacheindexforkey = #622; /* Part of FTE_CSQC_SERVERBROWSER*/ 1308 void(string key) addwantedhostcachekey = #623; /* Part of FTE_CSQC_SERVERBROWSER*/ 1309 string() getextresponse = #624; /* Part of FTE_CSQC_SERVERBROWSER*/ 1310 string(string dnsname, optional float defport) netaddress_resolve = #625; 1311 string(string fmt, ...) sprintf = #627; 1312 float(entity e, float s) getsurfacenumtriangles = #628; 1313 vector(entity e, float s, float n) getsurfacetriangle = #629; 1314 string(string digest, string data, ...) digest_hex = #639; 1315 #if defined(CSQC) || defined(MENU) 1316 #define K_TAB 9 1317 #define K_ENTER 13 1318 #define K_ESCAPE 27 1319 #define K_SPACE 32 1320 #define K_BACKSPACE 127 1321 #define K_UPARROW 128 1322 #define K_DOWNARROW 129 1323 #define K_LEFTARROW 130 1324 #define K_RIGHTARROW 131 1325 #define K_LALT 132 1326 #define K_RALT -245 1327 #define K_LCTRL 133 1328 #define K_RCTRL -246 1329 #define K_LSHIFT 134 1330 #define K_RSHIFT -247 1331 #define K_F1 135 1332 #define K_F2 136 1333 #define K_F3 137 1334 #define K_F4 138 1335 #define K_F5 139 1336 #define K_F6 140 1337 #define K_F7 141 1338 #define K_F8 142 1339 #define K_F9 143 1340 #define K_F10 144 1341 #define K_F11 145 1342 #define K_F12 146 1343 #define K_INS 147 1344 #define K_DEL 148 1345 #define K_PGDN 149 1346 #define K_PGUP 150 1347 #define K_HOME 151 1348 #define K_END 152 1349 #define K_KP_HOME 164 1350 #define K_KP_UPARROW 165 1351 #define K_KP_PGUP 166 1352 #define K_KP_LEFTARROW 161 1353 #define K_KP_5 162 1354 #define K_KP_RIGHTARROW 163 1355 #define K_KP_END 158 1356 #define K_KP_DOWNARROW 159 1357 #define K_KP_PGDN 160 1358 #define K_KP_ENTER 172 1359 #define K_KP_INS 157 1360 #define K_KP_DEL 167 1361 #define K_KP_SLASH 168 1362 #define K_KP_MINUS 170 1363 #define K_KP_PLUS 171 1364 #define K_KP_NUMLOCK 154 1365 #define K_KP_STAR 169 1366 #define K_KP_EQUALS 173 1367 #define K_MOUSE1 512 1368 #define K_MOUSE2 513 1369 #define K_MOUSE3 514 1370 #define K_MOUSE4 517 1371 #define K_MOUSE5 518 1372 #define K_MOUSE6 519 1373 #define K_MOUSE7 520 1374 #define K_MOUSE8 521 1375 #define K_MOUSE9 522 1376 #define K_MOUSE10 523 1377 #define K_LWIN 239 1378 #define K_RWIN 240 1379 #define K_APP -241 1380 #define K_SEARCH -242 1381 #define K_POWER 130 1382 #define K_VOLUP -243 1383 #define K_VOLDOWN -244 1384 #define K_JOY1 768 1385 #define K_JOY2 769 1386 #define K_JOY3 770 1387 #define K_JOY4 771 1388 #define K_AUX1 784 1389 #define K_AUX2 785 1390 #define K_AUX3 786 1391 #define K_AUX4 787 1392 #define K_AUX5 788 1393 #define K_AUX6 789 1394 #define K_AUX7 790 1395 #define K_AUX8 791 1396 #define K_AUX9 792 1397 #define K_AUX10 793 1398 #define K_AUX11 794 1399 #define K_AUX12 795 1400 #define K_AUX13 796 1401 #define K_AUX14 797 1402 #define K_AUX15 798 1403 #define K_AUX16 799 1404 #define K_AUX17 800 1405 #define K_AUX18 801 1406 #define K_AUX19 802 1407 #define K_AUX20 803 1408 #define K_AUX21 804 1409 #define K_AUX22 805 1410 #define K_AUX23 806 1411 #define K_AUX24 807 1412 #define K_AUX25 808 1413 #define K_AUX26 809 1414 #define K_AUX27 810 1415 #define K_AUX28 811 1416 #define K_AUX29 812 1417 #define K_AUX30 813 1418 #define K_AUX31 814 1419 #define K_AUX32 815 1420 #define K_PAUSE 153 1421 #define K_MWHEELUP 515 1422 #define K_MWHEELDOWN 516 1423 #define K_PRINTSCREEN 174 1424 #define K_CAPSLOCK 155 1425 #define K_SCROLLLOCK 156 1426 #define K_SEMICOLON 59 1427 #define K_TILDE 126 1428 #define K_BACKQUOTE 96 1429 #define K_BACKSLASH 92 1430 #endif 1431 #pragma noref 0