float time;
float frametime;
-float player_localentnum; //the entnum of the VIEW entity
-float player_localnum; //the playernum
+int player_localentnum; //the entnum of the VIEW entity
+int player_localnum; //the playernum
float maxclients; //a constant filled in by the engine. gah, portability eh?
float clientcommandframe; //player movement
void() CSQC_Shutdown;
float(float f, float t, float n) CSQC_InputEvent;
void(float w, float h) CSQC_UpdateView;
-float(string s) CSQC_ConsoleCommand;
+bool(string s) CSQC_ConsoleCommand;
//these fields are read and set by the default player physics
vector pmove_org;
float input_timelength;
vector input_angles;
vector input_movevalues; //forwards, right, up.
-float input_buttons; //attack, use, jump (default physics only uses jump)
+int input_buttons; //attack, use, jump (default physics only uses jump)
float movevar_gravity;
float movevar_stopspeed;
//
// system fields (*** = do not set in prog code, maintained by C code)
//
-.float modelindex; // *** model index in the precached list
+.int modelindex; // *** model index in the precached list
.vector absmin, absmax; // *** origin + mins / maxs
-.float entnum; // *** the ent number as on the server
+.int entnum; // *** the ent number as on the server
.float drawmask;
.void() predraw;
.string classname; // spawn function
.string model;
-.float frame;
-.float skin;
+.int frame;
+.int skin;
.int effects;
.vector mins, maxs; // bounding box extents reletive to origin
// Basic variables
.float enttype; // entity type sent from server
.int sv_entnum; // entity number sent from server
-.float team;
-.float team_size;
+.int team;
+.int team_size;
float vid_conwidth, vid_conheight;
-float binddb;
+int binddb;
// QUALIFYING
float race_checkpoint;
string shortmapname;
// database for misc stuff
-float tempdb;
-float ClientProgsDB;
+int tempdb;
+int ClientProgsDB;
vector hook_shotorigin[4];
vector lightning_shotorigin[4];
const float MIN_DAMAGEEXTRARADIUS = 2;
const float MAX_DAMAGEEXTRARADIUS = 16;
.float damageextraradius;
-.void(float thisdmg, float hittype, vector org, vector thisforce) event_damage;
+.void(float thisdmg, int hittype, vector org, vector thisforce) event_damage;
// only for Porto
float angles_held_status;
vector angles_held;
// weapons
-.float silent;
+.bool silent;
int w_deathtype;
float w_issilent, w_random;
float uid2name_dialog;
-.float csqcmodel_isdead; // used by shownames and miscfunctions (float getplayerisdead(float) {}) to know when a player is dead
+.bool csqcmodel_isdead; // used by shownames and miscfunctions (float getplayerisdead(float) {}) to know when a player is dead
#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)
clearentity_ent = spawn();
clearentity_ent.classname = "clearentity";
}
- float n = e.entnum;
+ int n = e.entnum;
copyentity(clearentity_ent, e);
e.entnum = n;
}
dprintf("^4CSQC Build information: ^1%s\n", WATERMARK);
#endif
- float i;
+ int i;
binddb = db_create();
tempdb = db_create();
}
.float has_team;
-float SetTeam(entity o, float Team)
+float SetTeam(entity o, int Team)
{
entity tm;
if(teamplay)
void Ent_ReadPlayerScore()
{
- float i, n;
- float isNew;
+ int i, n;
+ bool isNew;
entity o;
// damnit -.- don't want to go change every single .sv_entnum in hud.qc AGAIN
void Ent_ReadTeamScore()
{
- float i;
+ int i;
entity o;
self.team = ReadByte();
sf = ReadShort();
lf = ReadShort();
#endif
- float p;
+ int p;
for(i = 0, p = 1; i < MAX_TEAMSCORE; ++i, p *= 2)
if(sf & p)
{
void Net_ReadPingPLReport()
{
- float e, pi, pl, ml;
+ int e, pi, pl, ml;
e = ReadByte();
pi = ReadShort();
pl = ReadByte();
if(self.csqcmodel_teleported)
Projectile_ResetTrail(self.origin);
}
-.bool snd_looping;
+.int snd_looping;
void CSQCModel_Effects_Apply(void)
{
int eff = self.csqcmodel_effects & ~CSQCMODEL_EF_RESPAWNGHOST;
string tex;
vector rgb;
float t;
- float s;
+ int s;
vector vs;
float intensity, offset;
float scoreboard_bottom;
int weapon_accuracy[WEP_MAXCOUNT];
-float complain_weapon;
+int complain_weapon;
string complain_weapon_name;
float complain_weapon_type;
float complain_weapon_time;
// --------------------------------------------------------------------------
// Scoreboard stuff
-const float MAX_HUD_FIELDS = 16;
+const int MAX_HUD_FIELDS = 16;
-const float SP_END = -1;
+const int SP_END = -1;
-const float SP_PING = -2;
-const float SP_NAME = -3;
-const float SP_KDRATIO = -4;
-const float SP_CLRATIO = -5;
-const float SP_PL = -6;
-const float SP_FRAGS = -7;
-const float SP_SUM = -8;
+const int SP_PING = -2;
+const int SP_NAME = -3;
+const int SP_KDRATIO = -4;
+const int SP_CLRATIO = -5;
+const int SP_PL = -6;
+const int SP_FRAGS = -7;
+const int SP_SUM = -8;
-const float SP_SEPARATOR = -100;
+const int SP_SEPARATOR = -100;
float hud_field[MAX_HUD_FIELDS + 1];
float hud_size[MAX_HUD_FIELDS + 1];
float hud;
float view_quality;
-float framecount;
+int framecount;
}
}
-const float NUM_SSDIRS = 4;
+const int NUM_SSDIRS = 4;
string ssdirs[NUM_SSDIRS];
int n_ssdirs;
void MapVote_Init()
entity GetTeam(int Team, bool add)
{
- float num;
- entity tm;
- num = (Team == NUM_SPECTATOR) ? 16 : Team;
+ int num = (Team == NUM_SPECTATOR) ? 16 : Team;
if(teamslots[num])
return teamslots[num];
if (!add)
return world;
- tm = spawn();
+ entity tm = spawn();
tm.team = Team;
teamslots[num] = tm;
RegisterTeam(tm);
return false;
}
-void URI_Get_Callback(float id, float status, string data)
+void URI_Get_Callback(int id, float status, string data)
{
if(url_URI_Get_Callback(id, status, data))
{
}
-const float MAX_ACCURACY_LEVELS = 10;
+const int MAX_ACCURACY_LEVELS = 10;
float acc_lev[MAX_ACCURACY_LEVELS];
vector acc_col[MAX_ACCURACY_LEVELS];
float acc_col_loadtime;
float _Movetype_CheckWater(entity ent) // SV_CheckWater
{
- float supercontents;
+ int supercontents;
float nativecontents;
vector point;
float _Movetype_TestEntityPosition(vector ofs) // SV_TestEntityPosition
{
vector org;
- float cont;
org = self.move_origin + ofs;
- cont = self.dphitcontentsmask;
+ int cont = self.dphitcontentsmask;
self.dphitcontentsmask = DPCONTENTS_SOLID;
tracebox(self.move_origin, self.mins, self.maxs, self.move_origin, MOVE_NOMONSTERS, self);
self.dphitcontentsmask = cont;
-.float dphitcontentsmask;
+.int dphitcontentsmask;
.int cnt; // effect number
.vector velocity; // particle velocity
.float skeleton_info_modelindex;
.float skeleton_info_skin;
-const float BONETYPE_LOWER = 0;
-const float BONETYPE_UPPER = 1;
-const float MAX_BONES = 128;
+const int BONETYPE_LOWER = 0;
+const int BONETYPE_UPPER = 1;
+const int MAX_BONES = 128;
.float skeleton_bonetype[MAX_BONES];
.float skeleton_numbones;
void skeleton_loadinfo(entity e)
{
- float i;
+ int i;
if(e.skeleton_info_modelindex == e.modelindex && e.skeleton_info_skin == e.skin)
return;
e.bone_upperbody = 0;
{
float s = e.skeletonindex;
float n = (e.skeleton_numbones = skel_get_numbones(s));
- float i;
+ int i;
for(i = 1; i <= n; ++i)
{
float t = BONETYPE_LOWER;
- float p = skel_get_boneparent(s, i);
+ int p = skel_get_boneparent(s, i);
if(p > 0)
t = e.(skeleton_bonetype[p-1]);
if(i == e.bone_upperbody)
void skeleton_from_frames(entity e, float is_dead)
{
- float i;
float m = e.modelindex;
if(!e.skeletonindex)
{
float s = e.skeletonindex;
if(!s)
return;
- float bone;
float n = e.skeleton_numbones;
float savelerpfrac = e.lerpfrac;
float savelerpfrac3 = e.lerpfrac3;
skel_get_boneabs(s, e.bone_upperbody);
fixbone_oldangles = fixedvectoangles2(v_forward, v_up);
}
-
+ int bone;
for(bone = 0; bone < n; )
{
float firstbone = bone;
if(!is_dead)
{
+ int i;
for(i = 0; i < MAX_AIM_BONES; ++i)
{
if(e.(bone_aim[i]))
void skeleton_loadinfo(entity e);
.float bone_upperbody;
-.float bone_weapon;
+.int bone_weapon;
.float bone_aim[MAX_AIM_BONES];
.float bone_aimweight[MAX_AIM_BONES];
.float fixbone;
float HUD_ComparePlayerScores(entity left, entity right)
{
- float vl, vr, r, i;
+ float vl, vr, r;
vl = GetPlayerColor(left.sv_entnum);
vr = GetPlayerColor(right.sv_entnum);
if (r >= 0)
return r;
+ int i;
for(i = 0; i < MAX_SCORE; ++i)
{
r = HUD_CompareScore(left.scores[i], right.scores[i], scores_flags[i]);
float hud_field_icon0_alpha;
float hud_field_icon1_alpha;
float hud_field_icon2_alpha;
-string HUD_GetField(entity pl, float field)
+string HUD_GetField(entity pl, int field)
{
float tmp, num, denom, f;
string str;
vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size)
{
- float body_table_height, i;
+ float body_table_height;
vector tmp = '0 0 0', column_dim = '0 0 0';
entity pl;
// print the strings of the columns headers and draw the columns
draw_beginBoldFont();
+ int i;
for(i = 0; i < hud_num_fields; ++i)
{
if(hud_field[i] == SP_SEPARATOR)
-const float MAX_TEAMRADAR_TIMES = 32;
+const int MAX_TEAMRADAR_TIMES = 32;
// to make entities have dots on the team radar
.float teamradar_icon;
turret_precache(TID_COMMON);
}
-void turret_precache(float _tid)
+void turret_precache(int _tid)
{
if (!turret_is_precache[TID_COMMON])
{
void ent_turret()
{
- float sf;
- sf = ReadByte();
+ int sf = ReadByte();
if(sf & TNSF_SETUP)
{
}
}
#define HUD_GETSTATS \
- int vh_health = getstati(STAT_VEHICLESTAT_HEALTH); \
- int shield = getstati(STAT_VEHICLESTAT_SHIELD); \
+ int vh_health = getstati(STAT_VEHICLESTAT_HEALTH); \
+ float shield = getstati(STAT_VEHICLESTAT_SHIELD); \
noref int energy = getstati(STAT_VEHICLESTAT_ENERGY); \
- noref int ammo1 = getstati(STAT_VEHICLESTAT_AMMO1); \
- noref int reload1 = getstati(STAT_VEHICLESTAT_RELOAD1); \
+ noref float ammo1 = getstati(STAT_VEHICLESTAT_AMMO1); \
+ noref float reload1 = getstati(STAT_VEHICLESTAT_RELOAD1); \
noref int ammo2 = getstati(STAT_VEHICLESTAT_AMMO2); \
noref int reload2 = getstati(STAT_VEHICLESTAT_RELOAD2);
.float lip;
.float bgmscriptangular;
-.float lodmodelindex0, lodmodelindex1, lodmodelindex2;
+.int lodmodelindex0, lodmodelindex1, lodmodelindex2;
.float loddistance1, loddistance2;
.vector saved;
// client side frame inferring
void animdecide_setimplicitstate(entity e, float onground);
-void animdecide_setframes(entity e, float support_blending, .float fld_frame, .float fld_frame1time, .float fld_frame2, .float fld_frame2time);
+void animdecide_setframes(entity e, bool support_blending, .int fld_frame, .int fld_frame1time, .int fld_frame2, .int fld_frame2time);
// please network this one
.int anim_state;
// explicit anim states (networked)
void animdecide_setstate(entity e, float newstate, float restart);
-const float ANIMSTATE_DEAD1 = 1; // base frames: die1
-const float ANIMSTATE_DEAD2 = 2; // base frames: die2
-const float ANIMSTATE_DUCK = 4; // turns walk into duckwalk, jump into duckjump, etc.
-const float ANIMSTATE_FROZEN = 8; // force idle
+const int ANIMSTATE_DEAD1 = 1; // base frames: die1
+const int ANIMSTATE_DEAD2 = 2; // base frames: die2
+const int ANIMSTATE_DUCK = 4; // turns walk into duckwalk, jump into duckjump, etc.
+const int ANIMSTATE_FROZEN = 8; // force idle
// implicit anim states (inferred from velocity, etc.)
-const float ANIMIMPLICITSTATE_INAIR = 1;
-const float ANIMIMPLICITSTATE_FORWARD = 2;
-const float ANIMIMPLICITSTATE_BACKWARDS = 4;
-const float ANIMIMPLICITSTATE_LEFT = 8;
-const float ANIMIMPLICITSTATE_RIGHT = 16;
-const float ANIMIMPLICITSTATE_JUMPRELEASED = 32;
+const int ANIMIMPLICITSTATE_INAIR = 1;
+const int ANIMIMPLICITSTATE_FORWARD = 2;
+const int ANIMIMPLICITSTATE_BACKWARDS = 4;
+const int ANIMIMPLICITSTATE_LEFT = 8;
+const int ANIMIMPLICITSTATE_RIGHT = 16;
+const int ANIMIMPLICITSTATE_JUMPRELEASED = 32;
// explicit actions (networked); negative values are for lower body
void animdecide_setaction(entity e, float action, float restart);
-const float ANIMACTION_JUMP = -1; // jump
-const float ANIMACTION_DRAW = 1; // draw
-const float ANIMACTION_PAIN1 = 2; // pain
-const float ANIMACTION_PAIN2 = 3; // pain
-const float ANIMACTION_SHOOT = 4; // shoot
-const float ANIMACTION_TAUNT = 5; // taunt
-const float ANIMACTION_MELEE = 6; // melee
+const int ANIMACTION_JUMP = -1; // jump
+const int ANIMACTION_DRAW = 1; // draw
+const int ANIMACTION_PAIN1 = 2; // pain
+const int ANIMACTION_PAIN2 = 3; // pain
+const int ANIMACTION_SHOOT = 4; // shoot
+const int ANIMACTION_TAUNT = 5; // taunt
+const int ANIMACTION_MELEE = 6; // melee
// add properties you want networked to CSQC here
#define CSQCMODEL_EXTRAPROPERTIES \
- CSQCMODEL_PROPERTY(1, float, ReadShort, WriteShort, colormap) \
- CSQCMODEL_PROPERTY(2, float, ReadInt24_t, WriteInt24_t, effects) \
- CSQCMODEL_PROPERTY(4, float, ReadByte, WriteByte, modelflags) \
+ CSQCMODEL_PROPERTY(1, int, ReadShort, WriteShort, colormap) \
+ CSQCMODEL_PROPERTY(2, int, ReadInt24_t, WriteInt24_t, effects) \
+ CSQCMODEL_PROPERTY(4, int, ReadByte, WriteByte, modelflags) \
CSQCMODEL_PROPERTY_SCALED(8, float, ReadByte, WriteByte, alpha, 254, -1, 254) \
CSQCMODEL_PROPERTY(16, float, ReadByte, WriteByte, skin) \
CSQCMODEL_PROPERTY(32, float, ReadApproxPastTime, WriteApproxPastTime, death_time) \
// use slots 70-100
-const float PROJECTILE_NADE = 71;
-const float PROJECTILE_NADE_BURN = 72;
-const float PROJECTILE_NADE_NAPALM = 73;
-const float PROJECTILE_NADE_NAPALM_BURN = 74;
-const float PROJECTILE_NAPALM_FOUNTAIN = 75;
-const float PROJECTILE_NADE_ICE = 76;
-const float PROJECTILE_NADE_ICE_BURN = 77;
-const float PROJECTILE_NADE_TRANSLOCATE = 78;
-const float PROJECTILE_NADE_SPAWN = 79;
-const float PROJECTILE_NADE_HEAL = 80;
-const float PROJECTILE_NADE_HEAL_BURN = 81;
-const float PROJECTILE_NADE_MONSTER = 82;
-const float PROJECTILE_NADE_MONSTER_BURN = 83;
+const int PROJECTILE_NADE = 71;
+const int PROJECTILE_NADE_BURN = 72;
+const int PROJECTILE_NADE_NAPALM = 73;
+const int PROJECTILE_NADE_NAPALM_BURN = 74;
+const int PROJECTILE_NAPALM_FOUNTAIN = 75;
+const int PROJECTILE_NADE_ICE = 76;
+const int PROJECTILE_NADE_ICE_BURN = 77;
+const int PROJECTILE_NADE_TRANSLOCATE = 78;
+const int PROJECTILE_NADE_SPAWN = 79;
+const int PROJECTILE_NADE_HEAL = 80;
+const int PROJECTILE_NADE_HEAL_BURN = 81;
+const int PROJECTILE_NADE_MONSTER = 82;
+const int PROJECTILE_NADE_MONSTER_BURN = 83;
-const float NADE_TYPE_NORMAL = 1;
-const float NADE_TYPE_NAPALM = 2;
-const float NADE_TYPE_ICE = 3;
-const float NADE_TYPE_TRANSLOCATE = 4;
-const float NADE_TYPE_SPAWN = 5;
-const float NADE_TYPE_HEAL = 6;
-const float NADE_TYPE_MONSTER = 7;
+const int NADE_TYPE_NORMAL = 1;
+const int NADE_TYPE_NAPALM = 2;
+const int NADE_TYPE_ICE = 3;
+const int NADE_TYPE_TRANSLOCATE = 4;
+const int NADE_TYPE_SPAWN = 5;
+const int NADE_TYPE_HEAL = 6;
+const int NADE_TYPE_MONSTER = 7;
-const float NADE_TYPE_LAST = 7; // a check to prevent using higher values & crashing
+const int NADE_TYPE_LAST = 7; // a check to prevent using higher values & crashing
-vector Nade_Color(float nadeid)
+vector Nade_Color(int nadeid)
{
switch(nadeid)
{
return '0 0 0';
}
-float Nade_IDFromProjectile(float proj)
+int Nade_IDFromProjectile(float proj)
{
switch(proj)
{
return 0;
}
-float Nade_ProjectileFromID(float proj, float burn)
+int Nade_ProjectileFromID(int proj, bool burn)
{
switch(proj)
{
return sc;
}
-float fexists(string f)
+bool fexists(string f)
{
- float fh;
- fh = fopen(f, FILE_READ);
+ int fh = fopen(f, FILE_READ);
if (fh < 0)
return false;
fclose(fh);
#ifndef MENUQC
#ifdef CSQC
-float ReadInt24_t()
+int ReadInt24_t()
{
float v;
v = ReadShort() * 256; // note: this is signed
#endif
#ifndef MENUQC
-float Mod_Q1BSP_SuperContentsFromNativeContents(float nativecontents)
+int Mod_Q1BSP_SuperContentsFromNativeContents(int nativecontents)
{
switch(nativecontents)
{
return 0;
}
-float Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents)
+int Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents)
{
if(supercontents & (DPCONTENTS_SOLID | DPCONTENTS_BODY))
return CONTENT_SOLID;
// works for up to 10 decimals!
string ftos_decimals(float number, float decimals);
-float fexists(string f);
+bool fexists(string f);
vector colormapPaletteColor(float c, float isPants);
#ifndef MENUQC
#ifdef CSQC
-float ReadInt24_t();
+int ReadInt24_t();
vector ReadInt48_t();
vector ReadInt72_t();
#else
string get_model_parameters_description;
string get_model_parameters_bone_upperbody;
string get_model_parameters_bone_weapon;
-const float MAX_AIM_BONES = 4;
+const int MAX_AIM_BONES = 4;
string get_model_parameters_bone_aim[MAX_AIM_BONES];
float get_model_parameters_bone_aimweight[MAX_AIM_BONES];
float get_model_parameters_fixbone;
#endif
#ifndef MENUQC
-float Mod_Q1BSP_SuperContentsFromNativeContents(float nativecontents);
-float Mod_Q1BSP_NativeContentsFromSuperContents(float supercontents);
+int Mod_Q1BSP_SuperContentsFromNativeContents(int nativecontents);
+int Mod_Q1BSP_NativeContentsFromSuperContents(int supercontents);
#endif
// Quadratic splines (bezier)
void() CSQC_Shutdown;
float(float f, float t, float n) CSQC_InputEvent;
void(float w, float h) CSQC_UpdateView;
-float(string s) CSQC_ConsoleCommand;
+bool(string s) CSQC_ConsoleCommand;
//these fields are read and set by the default player physics
vector pmove_org;
//
// system fields (*** = do not set in prog code, maintained by C code)
//
-.float modelindex; // *** model index in the precached list
+.int modelindex; // *** model index in the precached list
.vector absmin, absmax; // *** origin + mins / maxs
.int entnum; // *** the ent number as on the server
.string classname; // spawn function
.string model;
-.float frame;
-.float skin;
+.int frame;
+.int skin;
.int effects;
.vector mins, maxs; // bounding box extents reletive to origin
float(string s) checkextension = #99;
// FrikaC and Telejano range #100-#199
-float(string filename, float mode) fopen = #110;
+int(string filename, int mode) fopen = #110;
void(float fhandle) fclose = #111;
string(float fhandle) fgets = #112;
void(float fhandle, string s) fputs = #113;
float(vector position, string text, vector scale, float alpha, float flag) drawcolorcodedstring = #326;
vector(vector position, string text, vector scale, vector rgb, float alpha, float flag) drawcolorcodedstring2 = #326;
-float(float stnum) getstatf = #330;
-float(float stnum, ...) getstati = #331; // can optionally take first bit and count
+float(int stnum) getstatf = #330;
+int(int stnum, ...) getstati = #331; // can optionally take first bit and count
string(float firststnum) getstats = #332;
void(entity e, float mdlindex) setmodelindex = #333;
string(float mdlindex) modelnameforindex = #334;
-float(string effectname) particleeffectnum = #335;
+int(string effectname) particleeffectnum = #335;
void(entity ent, float effectnum, vector start, vector end) trailparticles = #336;
//void(float effectnum, vector origin [, vector dir, float count]) pointparticles = #337;
void(float effectnum, vector origin , vector dir, float count) pointparticles = #337;
float(entity e, vector p) getsurfacenearpoint = #438;
vector(entity e, float s, vector p) getsurfaceclippedpoint = #439;
-float(string s) tokenize = #441;
+int(string s) tokenize = #441;
string(float n) argv = #442;
void(entity e, entity tagentity, string tagname) setattachment = #443;
float(string pattern, float caseinsensitive, float quiet) search_begin = #444;
string(string s) cvar_string = #448;
entity(entity start, .float fld, float match) findflags = #449;
entity(.float fld, float match) findchainflags = #450;
-float(entity ent, string tagname) gettagindex = #451;
+int(entity ent, string tagname) gettagindex = #451;
vector(entity ent, float tagindex) gettaginfo = #452;
void(vector org, vector vel, float howmany) te_flamejet = #457;
//idea: Electro, SavageX, LordHavoc
//darkplaces implementation: LordHavoc
//builtin definitions:
-float(string s, string separator1, ...) tokenizebyseparator = #479;
+int(string s, string separator1, ...) tokenizebyseparator = #479;
//description:
//this function returns tokens separated by any of the supplied separator strings, example:
//numnumbers = tokenizebyseparator("10.2.3.4", ".");
//idea: divVerent
//darkplaces implementation: divVerent
//builtin definitions:
-float(string s) tokenize_console = #514;
-float(float i) argv_start_index = #515;
-float(float i) argv_end_index = #516;
+int(string s) tokenize_console = #514;
+int(float i) argv_start_index = #515;
+int(float i) argv_end_index = #516;
//description:
//this function returns tokens separated just like the console does
//also, functions are provided to get the index of the first and last character of each token in the original string
float(float modlindex, float framenum) frameduration = #277; // returns the intended play time (in seconds) of the specified framegroup, if it does not exist the result is 0, if it is a single frame it may be a small value around 0.1 or 0.
//fields:
.float skeletonindex; // active skeleton overriding standard animation on model
-.float frame; // primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
-.float frame2; // secondary framegroup animation (strength = lerpfrac)
-.float frame3; // tertiary framegroup animation (strength = lerpfrac3)
-.float frame4; // quaternary framegroup animation (strength = lerpfrac4)
+.int frame; // primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
+.int frame2; // secondary framegroup animation (strength = lerpfrac)
+.int frame3; // tertiary framegroup animation (strength = lerpfrac3)
+.int frame4; // quaternary framegroup animation (strength = lerpfrac4)
.float lerpfrac; // strength of framegroup blend
.float lerpfrac3; // strength of framegroup blend
.float lerpfrac4; // strength of framegroup blend
void(entity e, string s) parseentitydata = #608;
// assorted builtins
-const float STAT_MOVEVARS_TICRATE = 240;
-const float STAT_MOVEVARS_TIMESCALE = 241;
-const float STAT_FRAGLIMIT = 235;
-const float STAT_TIMELIMIT = 236;
-const float STAT_MOVEVARS_GRAVITY = 242;
-string(void) ReadPicture = #501;
+const int STAT_MOVEVARS_TICRATE = 240;
+const int STAT_MOVEVARS_TIMESCALE = 241;
+const int STAT_FRAGLIMIT = 235;
+const int STAT_TIMELIMIT = 236;
+const int STAT_MOVEVARS_GRAVITY = 242;
+string(void) ReadPicture = #501;
const int PARTICLES_USEALPHA = 1;
float particles_alphamin, particles_alphamax;
const int PARTICLES_USECOLOR = 2;
float(float skel, entity ent, float modlindex, float retainfrac, float firstbone, float lastbone) skel_build = #264; // blend in a percentage of standard animation, 0 replaces entirely, 1 does nothing, 0.5 blends half, etc, and this only alters the bones in the specified range for which out of bounds values like 0,100000 are safe (uses .frame, .frame2, .frame3, .frame4, .lerpfrac, .lerpfrac3, .lerpfrac4, .frame1time, .frame2time, .frame3time, .frame4time), returns skel on success, 0 on failure
float(float skel) skel_get_numbones = #265; // returns how many bones exist in the created skeleton, 0 if skeleton does not exist
string(float skel, float bonenum) skel_get_bonename = #266; // returns name of bone (as a tempstring), "" if invalid bonenum (< 1 for example) or skeleton does not exist
-float(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
-float(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, bonenum (1-based) on success, same as using gettagindex but takes modelindex instead of entity
+int(float skel, float bonenum) skel_get_boneparent = #267; // returns parent num for supplied bonenum, 0 if bonenum has no parent or bone does not exist (returned value is always less than bonenum, you can loop on this)
+int(float skel, string tagname) skel_find_bone = #268; // get number of bone with specified name, 0 on failure, bonenum (1-based) on success, same as using gettagindex but takes modelindex instead of entity
vector(float skel, float bonenum) skel_get_bonerel = #269; // get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)
vector(float skel, float bonenum) skel_get_boneabs = #270; // get matrix of bone in skeleton in model space - sets v_forward, v_right, v_up, returns origin (relative to entity)
void(float skel, float bonenum, vector org) skel_set_bone = #271; // set matrix of bone relative to its parent, reads v_forward, v_right, v_up, takes origin as parameter (relative to parent bone)