}
// used by curl command
-void Curl_URI_Get_Callback(float id, float status, string data)
+void Curl_URI_Get_Callback(int id, float status, string data)
{
int i = id - URI_GET_CURL;
float do_exec = curl_uri_get_exec[i];
#define CMD_Write_Alias(execute,command,description) CMD_Write(sprintf("alias %-20s \"%-13s %-20s ${* ?}\" // %s\n", command, execute, command, description))
void GenericCommand_macro_write_aliases(float fh);
-void Curl_URI_Get_Callback(float id, float status, string data);
+void Curl_URI_Get_Callback(int id, float status, string data);
int curl_uri_get_pos;
float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL + 1];
string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL + 1];
// =========================================================
// identifiers for subfunction requests by the command code structure
-const float CMD_REQUEST_COMMAND = 1;
-const float CMD_REQUEST_USAGE = 2;
\ No newline at end of file
+const int CMD_REQUEST_COMMAND = 1;
+const int CMD_REQUEST_USAGE = 2;
\ No newline at end of file
entity monster_info[MON_MAXCOUNT];
entity dummy_monster_info;
-void register_monster(int id, float(float) func, float monsterflags, vector min_s, vector max_s, string modelname, string shortname, string mname)
+void register_monster(int id, float(float) func, int monsterflags, vector min_s, vector max_s, string modelname, string shortname, string mname)
{
entity e;
monster_info[id - 1] = e = spawn();
.float(float) monster_func; // m_...
.string mdl; // currently a copy of the model
.string model; // full name of model
-.float spawnflags;
+.int spawnflags;
.vector mins, maxs; // monster hitbox size
// other useful macros
void monster_remove(entity mon); // removes a monster
.float(float attack_type) monster_attackfunc;
-const float MONSTER_ATTACK_MELEE = 1;
-const float MONSTER_ATTACK_RANGED = 2;
+const int MONSTER_ATTACK_MELEE = 1;
+const int MONSTER_ATTACK_RANGED = 2;
.float monster_skill;
const float MONSTER_SKILL_EASY = 1;
float GetMonsterSoundSampleField_notFound;
-const float MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
-const float MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
-const float MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
+const int MONSTERSKILL_NOTEASY = 256; // monster will not spawn on skill <= 1
+const int MONSTERSKILL_NOTMEDIUM = 512; // monster will not spawn on skill 2
+const int MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
// new flags
-const float MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
-const float MONSTERFLAG_NORESPAWN = 4;
-const float MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
-const float MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
-const float MONSTERFLAG_MINIBOSS = 64; // monster spawns as mini-boss (also has a chance of naturally becoming one)
-const float MONSTERFLAG_INVINCIBLE = 128; // monster doesn't take damage (may be used for map objects & temporary monsters)
-const float MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
-const float MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
-
-.float monster_movestate; // used to tell what the monster is currently doing
-const float MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still
-const float MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
-const float MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
-const float MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
-const float MONSTER_MOVE_ENEMY = 5; // used only as a movestate
-
-const float MONSTER_STATE_ATTACK_LEAP = 1;
-const float MONSTER_STATE_ATTACK_MELEE = 2;
+const int MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
+const int MONSTERFLAG_NORESPAWN = 4;
+const int MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
+const int MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
+const int MONSTERFLAG_MINIBOSS = 64; // monster spawns as mini-boss (also has a chance of naturally becoming one)
+const int MONSTERFLAG_INVINCIBLE = 128; // monster doesn't take damage (may be used for map objects & temporary monsters)
+const int MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
+const int MONSTERFLAG_RESPAWNED = 32768; // flag for re-spawned monsters
+
+.int monster_movestate; // used to tell what the monster is currently doing
+const int MONSTER_MOVE_OWNER = 1; // monster will move to owner if in range, or stand still
+const int MONSTER_MOVE_WANDER = 2; // monster will ignore owner & wander around
+const int MONSTER_MOVE_SPAWNLOC = 3; // monster will move to its spawn location when not attacking
+const int MONSTER_MOVE_NOMOVE = 4; // monster simply stands still
+const int MONSTER_MOVE_ENEMY = 5; // used only as a movestate
+
+const int MONSTER_STATE_ATTACK_LEAP = 1;
+const int MONSTER_STATE_ATTACK_MELEE = 2;
fclose(fh);
}
-float db_create()
+int db_create()
{
return buf_create();
}
string fstrunzone(string s);
// database (NOTE: keys are case sensitive)
-void db_save(float db, string filename);
-void db_dump(float db, string pFilename);
-float db_create();
-float db_load(string filename);
-void db_close(float db);
-string db_get(float db, string key);
-void db_put(float db, string key, string value);
+void db_save(int db, string filename);
+void db_dump(int db, string pFilename);
+int db_create();
+int db_load(string filename);
+void db_close(int db);
+string db_get(int db, string key);
+void db_put(int db, string key, string value);
// stringbuffer loading/saving
-float buf_load(string filename);
-void buf_save(float buf, string filename);
+int buf_load(string filename);
+void buf_save(int buf, string filename);
#define TIME_TO_NTHS(t,n) floor((t) * (n) + 0.4)
string format_time(float seconds);
void(vector org, vector vel, float howmany) te_flamejet = #457;
entity(float num) entitybyindex = #459;
-float() buf_create = #460;
+int() buf_create = #460;
void(float bufhandle) buf_del = #461;
float(float bufhandle) buf_getsize = #462;
void(float bufhandle_from, float bufhandle_to) buf_copy = #463;
float trace_dphitq3surfaceflags; // Q3SURFACEFLAG_ value of impacted surface
string trace_dphittexturename; // texture name of impacted surface
//constants:
-float DPCONTENTS_SOLID = 1; // hit a bmodel, not a bounding box
-float DPCONTENTS_WATER = 2;
-float DPCONTENTS_SLIME = 4;
-float DPCONTENTS_LAVA = 8;
-float DPCONTENTS_SKY = 16;
-float DPCONTENTS_BODY = 32; // hit a bounding box, not a bmodel
-float DPCONTENTS_CORPSE = 64; // hit a SOLID_CORPSE entity
-float DPCONTENTS_NODROP = 128; // an area where backpacks should not spawn
-float DPCONTENTS_PLAYERCLIP = 256; // blocks player movement
-float DPCONTENTS_MONSTERCLIP = 512; // blocks monster movement
-float DPCONTENTS_DONOTENTER = 1024; // AI hint brush
-float DPCONTENTS_LIQUIDSMASK = 14; // WATER | SLIME | LAVA
-float DPCONTENTS_BOTCLIP = 2048; // AI hint brush
-float DPCONTENTS_OPAQUE = 4096; // only fully opaque brushes get this (may be useful for line of sight checks)
-float Q3SURFACEFLAG_NODAMAGE = 1;
-float Q3SURFACEFLAG_SLICK = 2; // low friction surface
-float Q3SURFACEFLAG_SKY = 4; // sky surface (also has NOIMPACT and NOMARKS set)
-float Q3SURFACEFLAG_LADDER = 8; // climbable surface
-float Q3SURFACEFLAG_NOIMPACT = 16; // projectiles should remove themselves on impact (this is set on sky)
-float Q3SURFACEFLAG_NOMARKS = 32; // projectiles should not leave marks, such as decals (this is set on sky)
-float Q3SURFACEFLAG_FLESH = 64; // projectiles should do a fleshy effect (blood?) on impact
-float Q3SURFACEFLAG_NODRAW = 128; // compiler hint (not important to qc)
+const int DPCONTENTS_SOLID = 1; // hit a bmodel, not a bounding box
+const int DPCONTENTS_WATER = 2;
+const int DPCONTENTS_SLIME = 4;
+const int DPCONTENTS_LAVA = 8;
+const int DPCONTENTS_SKY = 16;
+const int DPCONTENTS_BODY = 32; // hit a bounding box, not a bmodel
+const int DPCONTENTS_CORPSE = 64; // hit a SOLID_CORPSE entity
+const int DPCONTENTS_NODROP = 128; // an area where backpacks should not spawn
+const int DPCONTENTS_PLAYERCLIP = 256; // blocks player movement
+const int DPCONTENTS_MONSTERCLIP = 512; // blocks monster movement
+const int DPCONTENTS_DONOTENTER = 1024; // AI hint brush
+const int DPCONTENTS_LIQUIDSMASK = 14; // WATER | SLIME | LAVA
+const int DPCONTENTS_BOTCLIP = 2048; // AI hint brush
+const int DPCONTENTS_OPAQUE = 4096; // only fully opaque brushes get this (may be useful for line of sight checks)
+const int Q3SURFACEFLAG_NODAMAGE = 1;
+const int Q3SURFACEFLAG_SLICK = 2; // low friction surface
+const int Q3SURFACEFLAG_SKY = 4; // sky surface (also has NOIMPACT and NOMARKS set)
+const int Q3SURFACEFLAG_LADDER = 8; // climbable surface
+const int Q3SURFACEFLAG_NOIMPACT = 16; // projectiles should remove themselves on impact (this is set on sky)
+const int Q3SURFACEFLAG_NOMARKS = 32; // projectiles should not leave marks, such as decals (this is set on sky)
+const int Q3SURFACEFLAG_FLESH = 64; // projectiles should do a fleshy effect (blood?) on impact
+const int Q3SURFACEFLAG_NODRAW = 128; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_HINT = 256; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_SKIP = 512; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_NOLIGHTMAP = 1024; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_POINTLIGHT = 2048; // compiler hint (not important to qc)
-float Q3SURFACEFLAG_METALSTEPS = 4096; // walking on this surface should make metal step sounds
-float Q3SURFACEFLAG_NOSTEPS = 8192; // walking on this surface should not make footstep sounds
-float Q3SURFACEFLAG_NONSOLID = 16384; // compiler hint (not important to qc)
+const int Q3SURFACEFLAG_METALSTEPS = 4096; // walking on this surface should make metal step sounds
+const int Q3SURFACEFLAG_NOSTEPS = 8192; // walking on this surface should not make footstep sounds
+const int Q3SURFACEFLAG_NONSOLID = 16384; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_LIGHTFILTER = 32768; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_ALPHASHADOW = 65536; // compiler hint (not important to qc)
//float Q3SURFACEFLAG_NODLIGHT = 131072; // compiler hint (not important to qc)
//idea: ??
//darkplaces implementation: LordHavoc
//functions to manage string buffer objects - that is, arbitrary length string arrays that are handled by the engine
-float() buf_create = #460;
+int() buf_create = #460;
void(float bufhandle) buf_del = #461;
float(float bufhandle) buf_getsize = #462;
void(float bufhandle_from, float bufhandle_to) buf_copy = #463;
//idea: ??
//darkplaces implementation: LordHavoc
//functions to manage string buffer objects - that is, arbitrary length string arrays that are handled by the engine
-float() buf_create = #440;
+int() buf_create = #440;
void(float bufhandle) buf_del = #441;
float(float bufhandle) buf_getsize = #442;
void(float bufhandle_from, float bufhandle_to) buf_copy = #443;
//
// edict.flags
-float FL_FLY = 1;
-float FL_SWIM = 2;
-float FL_CLIENT = 8; // set for all client edicts
-float FL_INWATER = 16; // for enter / leave water splash
-float FL_MONSTER = 32;
-float FL_GODMODE = 64; // player cheat
-float FL_NOTARGET = 128; // player cheat
-float FL_ITEM = 256; // extra wide size for bonus items
-float FL_ONGROUND = 512; // standing on something
-float FL_PARTIALGROUND = 1024; // not all corners are valid
-float FL_WATERJUMP = 2048; // player jumping out of water
-float FL_JUMPRELEASED = 4096; // for jump debouncing
+const int FL_FLY = 1;
+const int FL_SWIM = 2;
+const int FL_CLIENT = 8; // set for all client edicts
+const int FL_INWATER = 16; // for enter / leave water splash
+const int FL_MONSTER = 32;
+const int FL_GODMODE = 64; // player cheat
+const int FL_NOTARGET = 128; // player cheat
+const int FL_ITEM = 256; // extra wide size for bonus items
+const int FL_ONGROUND = 512; // standing on something
+const int FL_PARTIALGROUND = 1024; // not all corners are valid
+const int FL_WATERJUMP = 2048; // player jumping out of water
+const int FL_JUMPRELEASED = 4096; // for jump debouncing
// edict.movetype values
-float MOVETYPE_NONE = 0; // never moves
-//float MOVETYPE_ANGLENOCLIP = 1;
-//float MOVETYPE_ANGLECLIP = 2;
-float MOVETYPE_WALK = 3; // players only
-float MOVETYPE_STEP = 4; // discrete, not real time unless fall
-float MOVETYPE_FLY = 5;
-float MOVETYPE_TOSS = 6; // gravity
-float MOVETYPE_PUSH = 7; // no clip to world, push and crush
-float MOVETYPE_NOCLIP = 8;
-float MOVETYPE_FLYMISSILE = 9; // fly with extra size against monsters
-float MOVETYPE_BOUNCE = 10;
-float MOVETYPE_BOUNCEMISSILE = 11; // bounce with extra size
+const int MOVETYPE_NONE = 0; // never moves
+//const int MOVETYPE_ANGLENOCLIP= 1;
+//const int MOVETYPE_ANGLECLIP = 2;
+const int MOVETYPE_WALK = 3; // players only
+const int MOVETYPE_STEP = 4; // discrete, not real time unless fall
+const int MOVETYPE_FLY = 5;
+const int MOVETYPE_TOSS = 6; // gravity
+const int MOVETYPE_PUSH = 7; // no clip to world, push and crush
+const int MOVETYPE_NOCLIP = 8;
+const int MOVETYPE_FLYMISSILE = 9; // fly with extra size against monsters
+const int MOVETYPE_BOUNCE = 10;
+const int MOVETYPE_BOUNCEMISSILE= 11; // bounce with extra size
// edict.solid values
-float SOLID_NOT = 0; // no interaction with other objects
-float SOLID_TRIGGER = 1; // touch on edge, but not blocking
-float SOLID_BBOX = 2; // touch on edge, block
-float SOLID_SLIDEBOX = 3; // touch on edge, but not an onground
-float SOLID_BSP = 4; // bsp clip, touch on edge, block
+const int SOLID_NOT = 0; // no interaction with other objects
+const int SOLID_TRIGGER = 1; // touch on edge, but not blocking
+const int SOLID_BBOX = 2; // touch on edge, block
+const int SOLID_SLIDEBOX = 3; // touch on edge, but not an onground
+const int SOLID_BSP = 4; // bsp clip, touch on edge, block
// range values
-float RANGE_MELEE = 0;
-float RANGE_NEAR = 1;
-float RANGE_MID = 2;
-float RANGE_FAR = 3;
+const int RANGE_MELEE = 0;
+const int RANGE_NEAR = 1;
+const int RANGE_MID = 2;
+const int RANGE_FAR = 3;
// deadflag values
-float DEAD_NO = 0;
-float DEAD_DYING = 1;
-float DEAD_DEAD = 2;
-float DEAD_RESPAWNABLE = 3;
-float DEAD_RESPAWNING = 4; // dead, waiting for buttons to be released
+const int DEAD_NO = 0;
+const int DEAD_DYING = 1;
+const int DEAD_DEAD = 2;
+const int DEAD_RESPAWNABLE = 3;
+const int DEAD_RESPAWNING = 4; // dead, waiting for buttons to be released
// takedamage values
-float DAMAGE_NO = 0;
-float DAMAGE_YES = 1;
-float DAMAGE_AIM = 2;
+const int DAMAGE_NO = 0;
+const int DAMAGE_YES = 1;
+const int DAMAGE_AIM = 2;
// items
-float IT_AXE = 4096;
-float IT_SHOTGUN = 1;
-float IT_SUPER_SHOTGUN = 2;
-float IT_NAILGUN = 4;
-float IT_SUPER_NAILGUN = 8;
-float IT_GRENADE_LAUNCHER = 16;
-float IT_ROCKET_LAUNCHER = 32;
-float IT_LIGHTNING = 64;
-float IT_EXTRA_WEAPON = 128;
-
-float IT_SHELLS = 256;
-float IT_NAILS = 512;
-float IT_ROCKETS = 1024;
-float IT_CELLS = 2048;
-
-float IT_ARMOR1 = 8192;
-float IT_ARMOR2 = 16384;
-float IT_ARMOR3 = 32768;
-float IT_SUPERHEALTH = 65536;
-
-float IT_KEY1 = 131072;
-float IT_KEY2 = 262144;
-
-float IT_INVISIBILITY = 524288;
-float IT_INVULNERABILITY = 1048576;
-float IT_SUIT = 2097152;
-float IT_QUAD = 4194304;
+const int IT_AXE = 4096;
+const int IT_SHOTGUN = 1;
+const int IT_SUPER_SHOTGUN = 2;
+const int IT_NAILGUN = 4;
+const int IT_SUPER_NAILGUN = 8;
+const int IT_GRENADE_LAUNCHER = 16;
+const int IT_ROCKET_LAUNCHER = 32;
+const int IT_LIGHTNING = 64;
+const int IT_EXTRA_WEAPON = 128;
+
+const int IT_SHELLS = 256;
+const int IT_NAILS = 512;
+const int IT_ROCKETS = 1024;
+const int IT_CELLS = 2048;
+
+const int IT_ARMOR1 = 8192;
+const int IT_ARMOR2 = 16384;
+const int IT_ARMOR3 = 32768;
+const int IT_SUPERHEALTH = 65536;
+
+const int IT_KEY1 = 131072;
+const int IT_KEY2 = 262144;
+
+const int IT_INVISIBILITY = 524288;
+const int IT_INVULNERABILITY = 1048576;
+const int IT_SUIT = 2097152;
+const int IT_QUAD = 4194304;
// point content values
-float CONTENT_EMPTY = -1;
-float CONTENT_SOLID = -2;
-float CONTENT_WATER = -3;
-float CONTENT_SLIME = -4;
-float CONTENT_LAVA = -5;
-float CONTENT_SKY = -6;
+const int CONTENT_EMPTY = -1;
+const int CONTENT_SOLID = -2;
+const int CONTENT_WATER = -3;
+const int CONTENT_SLIME = -4;
+const int CONTENT_LAVA = -5;
+const int CONTENT_SKY = -6;
-float STATE_TOP = 0;
-float STATE_BOTTOM = 1;
-float STATE_UP = 2;
-float STATE_DOWN = 3;
+const int STATE_TOP = 0;
+const int STATE_BOTTOM = 1;
+const int STATE_UP = 2;
+const int STATE_DOWN = 3;
-vector VEC_ORIGIN = '0 0 0';
-vector VEC_HULL_MIN = '-16 -16 -24';
-vector VEC_HULL_MAX = '16 16 32';
+const vector VEC_ORIGIN = '0 0 0';
+const vector VEC_HULL_MIN = '-16 -16 -24';
+const vector VEC_HULL_MAX = '16 16 32';
-vector VEC_HULL2_MIN = '-32 -32 -24';
-vector VEC_HULL2_MAX = '32 32 64';
+const vector VEC_HULL2_MIN = '-32 -32 -24';
+const vector VEC_HULL2_MAX = '32 32 64';
// protocol bytes
-float SVC_TEMPENTITY = 23;
-float SVC_KILLEDMONSTER = 27;
-float SVC_FOUNDSECRET = 28;
-float SVC_INTERMISSION = 30;
-float SVC_FINALE = 31;
-float SVC_CDTRACK = 32;
-float SVC_SELLSCREEN = 33;
-
-
-float TE_SPIKE = 0;
-float TE_SUPERSPIKE = 1;
-float TE_GUNSHOT = 2;
-float TE_EXPLOSION = 3;
-float TE_TAREXPLOSION = 4;
-float TE_LIGHTNING1 = 5;
-float TE_LIGHTNING2 = 6;
-float TE_WIZSPIKE = 7;
-float TE_KNIGHTSPIKE = 8;
-float TE_LIGHTNING3 = 9;
-float TE_LAVASPLASH = 10;
-float TE_TELEPORT = 11;
+const int SVC_TEMPENTITY = 23;
+const int SVC_KILLEDMONSTER = 27;
+const int SVC_FOUNDSECRET = 28;
+const int SVC_INTERMISSION = 30;
+const int SVC_FINALE = 31;
+const int SVC_CDTRACK = 32;
+const int SVC_SELLSCREEN = 33;
+
+
+const int TE_SPIKE = 0;
+const int TE_SUPERSPIKE = 1;
+const int TE_GUNSHOT = 2;
+const int TE_EXPLOSION = 3;
+const int TE_TAREXPLOSION = 4;
+const int TE_LIGHTNING1 = 5;
+const int TE_LIGHTNING2 = 6;
+const int TE_WIZSPIKE = 7;
+const int TE_KNIGHTSPIKE = 8;
+const int TE_LIGHTNING3 = 9;
+const int TE_LAVASPLASH = 10;
+const int TE_TELEPORT = 11;
// sound channels
// channel 0 never willingly overrides
// other channels (1-7) allways override a playing sound on that channel
-float CHAN_AUTO = 0;
-float CHAN_WEAPON = 1;
-float CHAN_VOICE = 2;
-float CHAN_ITEM = 3;
-float CHAN_BODY = 4;
+const int CHAN_AUTO = 0;
+const int CHAN_WEAPON = 1;
+const int CHAN_VOICE = 2;
+const int CHAN_ITEM = 3;
+const int CHAN_BODY = 4;
-float ATTN_NONE = 0;
-float ATTN_NORM = 1;
-float ATTN_IDLE = 2;
-float ATTN_STATIC = 3;
+const int ATTN_NONE = 0;
+const int ATTN_NORM = 1;
+const int ATTN_IDLE = 2;
+const int ATTN_STATIC = 3;
// update types
-float UPDATE_GENERAL = 0;
-float UPDATE_STATIC = 1;
-float UPDATE_BINARY = 2;
-float UPDATE_TEMP = 3;
+const int UPDATE_GENERAL = 0;
+const int UPDATE_STATIC = 1;
+const int UPDATE_BINARY = 2;
+const int UPDATE_TEMP = 3;
// entity effects
-float EF_BRIGHTFIELD = 1;
-float EF_MUZZLEFLASH = 2;
-float EF_BRIGHTLIGHT = 4;
-float EF_DIMLIGHT = 8;
+const int EF_BRIGHTFIELD = 1;
+const int EF_MUZZLEFLASH = 2;
+const int EF_BRIGHTLIGHT = 4;
+const int EF_DIMLIGHT = 8;
// messages
-float MSG_BROADCAST = 0; // unreliable to all
-float MSG_ONE = 1; // reliable to one (msg_entity)
-float MSG_ALL = 2; // reliable to all
-float MSG_INIT = 3; // write to the init string
+const int MSG_BROADCAST = 0; // unreliable to all
+const int MSG_ONE = 1; // reliable to one (msg_entity)
+const int MSG_ALL = 2; // reliable to all
+const int MSG_INIT = 3; // write to the init string
//===========================================================================
../../menu.dat
+../common/util-pre.qh
sys-pre.qh
../dpdefs/menudefs.qc
../dpdefs/keycodes.qc
sys-post.qh
config.qh
-../common/util-pre.qh
../warpzonelib/mathlib.qh
../common/util.qh
void XonoticPlayerList_setPlayerList(entity me, string plist)
{
- float buf,i,n;
+ int buf,i,n;
string s;
buf = buf_create();
void W_Porto_Remove (entity p);
-.float projectiledeathtype;
+.int projectiledeathtype;
.string message2;
string modname;
.float missile_flags;
-const float MIF_SPLASH = 2;
-const float MIF_ARC = 4;
-const float MIF_PROXY = 8;
-const float MIF_GUIDED_MANUAL = 16;
-const float MIF_GUIDED_HEAT = 32;
-const float MIF_GUIDED_LASER = 64;
-const float MIF_GUIDED_AI = 128;
-const float MIF_GUIDED_TAG = 128;
+const int MIF_SPLASH = 2;
+const int MIF_ARC = 4;
+const int MIF_PROXY = 8;
+const int MIF_GUIDED_MANUAL = 16;
+const int MIF_GUIDED_HEAT = 32;
+const int MIF_GUIDED_LASER = 64;
+const int MIF_GUIDED_AI = 128;
+const int MIF_GUIDED_TAG = 128;
#define MIF_GUIDED_ALL (MIF_GUIDED_MANUAL | MIF_GUIDED_HEAT | MIF_GUIDED_LASER | MIF_GUIDED_AI | MIF_GUIDED_TAG)
#define MIF_GUIDED_TRACKING (MIF_GUIDED_HEAT | MIF_GUIDED_LASER | MIF_GUIDED_AI | MIF_GUIDED_TAG)
#define MIF_GUIDED_CONFUSABLE (MIF_GUIDED_HEAT | MIF_GUIDED_AI)
// constants
-#define WANT_CONST /* we WANT these to be constant, but it conflicts with the declaration in dpdefs/progsdefs.qc */
-const int IT_UNLIMITED_WEAPON_AMMO = 1; // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
-const int IT_UNLIMITED_SUPERWEAPONS = 2; // when this bit is set, superweapons don't expire. Checkpoints can give this powerup.
-const int IT_CTF_SHIELDED = 4; // set for the flag shield
-const int IT_USING_JETPACK = 8; // confirmation that button is pressed
-const int IT_JETPACK = 16; // actual item
-const int IT_FUEL_REGEN = 32; // fuel regeneration trigger
+const int IT_UNLIMITED_WEAPON_AMMO = 1; // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
+const int IT_UNLIMITED_SUPERWEAPONS = 2; // when this bit is set, superweapons don't expire. Checkpoints can give this powerup.
+const int IT_CTF_SHIELDED = 4; // set for the flag shield
+const int IT_USING_JETPACK = 8; // confirmation that button is pressed
+const int IT_JETPACK = 16; // actual item
+const int IT_FUEL_REGEN = 32; // fuel regeneration trigger
// where is 64... ?
-const int IT_FUEL = 128;
-WANT_CONST int IT_SHELLS = 256;
-WANT_CONST int IT_NAILS = 512;
-WANT_CONST int IT_ROCKETS = 1024;
-WANT_CONST int IT_CELLS = 2048;
-const int IT_SUPERWEAPON = 4096;
-const int IT_STRENGTH = 8192;
-const int IT_INVINCIBLE = 16384;
-const int IT_HEALTH = 32768;
-const int IT_PLASMA = 65536;
+const int IT_FUEL = 128;
+const int IT_SHELLS = 256;
+const int IT_NAILS = 512;
+const int IT_ROCKETS = 1024;
+const int IT_CELLS = 2048;
+const int IT_SUPERWEAPON = 4096;
+const int IT_STRENGTH = 8192;
+const int IT_INVINCIBLE = 16384;
+const int IT_HEALTH = 32768;
+const int IT_PLASMA = 65536;
// shared value space (union):
// for items:
- WANT_CONST int IT_KEY1 = 131072;
- WANT_CONST int IT_KEY2 = 262144;
+ const int IT_KEY1 = 131072;
+ const int IT_KEY2 = 262144;
// for players:
- const int IT_RED_FLAG_TAKEN = 32768;
- const int IT_RED_FLAG_LOST = 65536;
- const int IT_RED_FLAG_CARRYING = 98304;
- const int IT_BLUE_FLAG_TAKEN = 131072;
- const int IT_BLUE_FLAG_LOST = 262144;
- const int IT_BLUE_FLAG_CARRYING = 393216;
+ const int IT_RED_FLAG_TAKEN = 32768;
+ const int IT_RED_FLAG_LOST = 65536;
+ const int IT_RED_FLAG_CARRYING = 98304;
+ const int IT_BLUE_FLAG_TAKEN = 131072;
+ const int IT_BLUE_FLAG_LOST = 262144;
+ const int IT_BLUE_FLAG_CARRYING = 393216;
// end
-const int IT_5HP = 524288;
-const int IT_25HP = 1048576;
-const int IT_ARMOR_SHARD = 2097152;
-const int IT_ARMOR = 4194304;
+const int IT_5HP = 524288;
+const int IT_25HP = 1048576;
+const int IT_ARMOR_SHARD = 2097152;
+const int IT_ARMOR = 4194304;
// item masks
-const int IT_AMMO = 3968; // IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_PLASMA;
-const int IT_PICKUPMASK = 51; // IT_FUEL_REGEN | IT_JETPACK | IT_UNLIMITED_AMMO; // strength and invincible are handled separately
-const int IT_UNLIMITED_AMMO = 3; // IT_UNLIMITED_SUPERWEAPONS | IT_UNLIMITED_WEAPON_AMMO;
+const int IT_AMMO = 3968; // IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_PLASMA;
+const int IT_PICKUPMASK = 51; // IT_FUEL_REGEN | IT_JETPACK | IT_UNLIMITED_AMMO; // strength and invincible are handled separately
+const int IT_UNLIMITED_AMMO = 3; // IT_UNLIMITED_SUPERWEAPONS | IT_UNLIMITED_WEAPON_AMMO;
const int AMMO_COUNT = 4; // amount of ammo types to show in the inventory panel