void Playerchecker_Think()
{
- float i;
+ int i;
entity e;
for(i = 0; i < maxclients; ++i)
{
}
void Ent_ReadEntCS()
{
- float sf;
+ int sf;
InterpolateOrigin_Undo();
self.classname = "entcs_receiver";
// RegisterPlayer(o);
//playerchecker will do this for us later, if it has not already done so
- float sf, lf;
+ int sf, lf;
#if MAX_SCORE <= 8
sf = ReadByte();
lf = ReadByte();
sf = ReadShort();
lf = ReadShort();
#endif
- float p;
+ int p;
for(i = 0, p = 1; i < MAX_SCORE; ++i, p *= 2)
if(sf & p)
{
self.team = ReadByte();
o = self.owner = GetTeam(self.team, true); // these team numbers can always be trusted
- float sf, lf;
+ int sf, lf;
#if MAX_TEAMSCORE <= 8
sf = ReadByte();
lf = ReadByte();
void Ent_ClientData()
{
- float f;
float newspectatee_status;
- f = ReadByte();
+ int f = ReadByte();
scoreboard_showscores_force = (f & 1);
void Ent_Nagger()
{
- float nags, i, j, b, f;
+ int i, j, b, f;
- nags = ReadByte(); // NAGS NAGS NAGS NAGS NAGS NAGS NADZ NAGS NAGS NAGS
+ int nags = ReadByte(); // NAGS NAGS NAGS NAGS NAGS NAGS NADZ NAGS NAGS NAGS
if(!(nags & 4))
{
void Ent_EliminatedPlayers()
{
- float sf, i, j, b, f;
+ int i, j, b, f;
- sf = ReadByte();
+ int sf = ReadByte();
if(sf & 1)
{
for(j = 0; j < maxclients; ++j)
void Ent_ReadAccuracy(void)
{
- float sf, f, w, b;
- sf = ReadInt24_t();
+ int f, w;
+ int sf = ReadInt24_t();
if(sf == 0)
{
for(w = 0; w <= WEP_LAST - WEP_FIRST; ++w)
{
if(sf & f)
{
- b = ReadByte();
+ int b = ReadByte();
if(b == 0)
weapon_accuracy[w] = -1;
else if(b == 255)
void Gamemode_Init();
void Ent_ScoresInfo()
{
- float i;
+ int i;
self.classname = "ent_client_scores_info";
gametype = ReadInt24_t();
HUD_ModIcons_SetFunc();
race_speedaward_alltimebest_holder = strzone(ReadString());
break;
case RACE_NET_SERVER_RANKINGS:
- float pos, prevpos, del;
- pos = ReadShort();
+ float prevpos, del;
+ int pos = ReadShort();
prevpos = ReadShort();
del = ReadShort();
// move other rankings out of the way
- float i;
+ int i;
if (prevpos) {
for (i=prevpos-1;i>pos-1;--i) {
grecordtime[i] = grecordtime[i-1];
void Porto_Draw()
{
vector p, dir, ang, q, nextdir;
- float idx, portal_number, portal1_idx;
+ float portal_number, portal1_idx;
if(activeweapon != WEP_PORTO || spectatee_status || gametype == MAPINFO_TYPE_NEXBALL)
return;
p = view_origin;
polyline[0] = p;
- idx = 1;
+ int idx = 1;
portal_number = 0;
nextdir = dir;
if(autocvar_crosshair_effect_time > 0)
{
f = (time - wcross_name_changestarttime) / autocvar_crosshair_effect_time;
- if (!(f < 1))
+ if (f >= 1)
{
wcross_ring_prev = ((ring_image) ? TRUE : FALSE);
}
{
entity e;
float fov;
- float f, i;
+ float f;
+ int i;
vector vf_size, vf_min;
float a;
float autocvar_g_balance_tuba_attenuation;
float autocvar_g_balance_tuba_fadetime;
float autocvar_g_balance_tuba_volume;
-int autocvar_g_balance_tuba_pitchstep; // TODO: figure out if this should be bool or int
+int autocvar_g_balance_tuba_pitchstep;
float autocvar_g_warmup_limit;
bool autocvar_g_waypointsprite_uppercase;
float autocvar_g_waypointsprite_alpha;
.bool snd_looping;
void CSQCModel_Effects_Apply(void)
{
- int eff = self.csqcmodel_effects;
- eff &= ~CSQCMODEL_EF_RESPAWNGHOST;
+ int eff = self.csqcmodel_effects & ~CSQCMODEL_EF_RESPAWNGHOST;
self.renderflags &= ~(RF_DEPTHHACK | RF_ADDITIVE | RF_FULLBRIGHT | EF_NOSHADOW | RF_USEAXIS);
self.effects = 0;
{
self.HookType = type;
- float sf;
- sf = ReadByte();
+ int sf = ReadByte();
self.HookSilent = (sf & 0x80);
self.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN;
if(sf & 1)
{
- float myowner = ReadByte();
+ int myowner = ReadByte();
self.owner = playerslots[myowner - 1];
self.sv_entnum = myowner;
switch(self.HookType)
// a laser goes from origin in direction angles
// it has color 'colormod'
// and stops when something is in the way
-.float cnt; // end effect
+.int cnt; // end effect
.vector colormod;
-.float state; // on-off
-.float count; // flags for the laser
+.int state; // on-off
+.int count; // flags for the laser
.vector velocity;
.float alpha;
.float scale; // scaling factor of the thickness
void Ent_Laser()
{
- float f;
InterpolateOrigin_Undo();
// 30 bytes, or 13 bytes for just moving
- f = ReadByte();
+ int f = ReadByte();
self.count = (f & 0xF0);
if(self.count & 0x80)
float hud_field[MAX_HUD_FIELDS + 1];
float hud_size[MAX_HUD_FIELDS + 1];
string hud_title[MAX_HUD_FIELDS + 1];
-float hud_num_fields;
+int hud_num_fields;
string scores_label[MAX_SCORE];
-float scores_flags[MAX_SCORE];
+int scores_flags[MAX_SCORE];
string teamscores_label[MAX_SCORE];
-float teamscores_flags[MAX_SCORE];
-.float scores[MAX_SCORE];
+int teamscores_flags[MAX_SCORE];
+.int scores[MAX_SCORE];
.float teamscores[MAX_TEAMSCORE];
#define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
float armorblockpercent;
//hooks
-float calledhooks;
-const float HOOK_START = 1;
-const float HOOK_END = 2;
+int calledhooks;
+const int HOOK_START = 1;
+const int HOOK_END = 2;
.float ping, ping_packetloss, ping_movementloss;
-float mv_num_maps;
+int mv_num_maps;
float mv_active;
string mv_maps[MAPVOTE_COUNT];
float mv_top2_alpha;
vector mv_mousepos;
-float mv_selection;
-float mv_columns;
-float mv_mouse_selection;
-float mv_selection_keyboard;
+int mv_selection;
+int mv_columns;
+int mv_mouse_selection;
+int mv_selection_keyboard;
float gametypevote;
string mapvote_chosenmap;
vector gtv_text_size;
vector gtv_text_size_small;
-string MapVote_FormatMapItem(float id, string map, float count, float maxwidth, vector fontsize)
+string MapVote_FormatMapItem(int id, string map, float count, float maxwidth, vector fontsize)
{
string pre, post;
pre = sprintf("%d. ", id+1);
return MapInfo_Type_Description(MapInfo_Type_FromString(mv_maps[id]));
}
-vector MapVote_RGB(float id)
+vector MapVote_RGB(int id)
{
if(mv_avail[id] != GTV_AVAILABLE)
return '1 1 1';
return '1 1 1';
}
-void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string gtype, string pic, float count, float id)
+void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string gtype, string pic, float count, int id)
{
float alpha;
float desc_padding = gtv_text_size_x * 3;
remove(title);
}
-void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float count, float id)
+void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float count, int id)
{
vector img_size = '0 0 0';
vector rgb;
drawfill(pos, img_size, '1 1 1', 0.1, DRAWFLAG_NORMAL);
}
-void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, float id)
+void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, int id)
{
vector rgb;
float text_size;
drawstring(pos, label, hud_fontsize, rgb, 1, DRAWFLAG_NORMAL);
}
-vector MapVote_GridVec(vector gridspec, float i, float m)
+vector MapVote_GridVec(vector gridspec, int i, int m)
{
- float r;
- r = i % m;
+ int r = i % m;
return
'1 0 0' * (gridspec_x * r)
+
void MapVote_Draw()
{
string map;
- float i, tmp;
+ int i;
+ float tmp;
vector pos;
float isize;
float center;
}
}
-void MapVote_CheckPK3(string pic, string pk3, float id)
+void MapVote_CheckPK3(string pic, string pk3, int id)
{
entity pak;
pak = spawn();
}
}
-void MapVote_CheckPic(string pic, string pk3, float id)
+void MapVote_CheckPic(string pic, string pk3, int id)
{
// never try to retrieve a pic for the "don't care" 'map'
if(mv_abstain && id == mv_num_maps - 1)
void MapVote_ReadMask()
{
- float i;
+ int i;
if ( mv_num_maps < 24 )
{
- float mask, power;
+ int mask, power;
if(mv_num_maps < 8)
mask = ReadByte();
else if(mv_num_maps < 16)
const float NUM_SSDIRS = 4;
string ssdirs[NUM_SSDIRS];
-float n_ssdirs;
+int n_ssdirs;
void MapVote_Init()
{
- float i, j;
+ int i, j;
string map, pk3, s;
precache_sound ("misc/invshot.wav");
localcmd(strcat("\nimpulse ", ftos(index+1), "\n"));
}
-float MapVote_MoveLeft(float pos)
+int MapVote_MoveLeft(int pos)
{
- float imp;
+ int imp;
if ( pos < 0 )
imp = mv_num_maps - 1;
else
imp = MapVote_MoveLeft(imp);
return imp;
}
-float MapVote_MoveRight(float pos)
+int MapVote_MoveRight(int pos)
{
- float imp;
+ int imp;
if ( pos < 0 )
imp = 0;
else
imp = MapVote_MoveRight(imp);
return imp;
}
-float MapVote_MoveUp(float pos)
+int MapVote_MoveUp(int pos)
{
- float imp;
+ int imp;
if ( pos < 0 )
imp = mv_num_maps - 1;
else
imp = MapVote_MoveUp(imp);
return imp;
}
-float MapVote_MoveDown(float pos)
+int MapVote_MoveDown(int pos)
{
- float imp;
+ int imp;
if ( pos < 0 )
imp = 0;
else
void MapVote_UpdateVotes()
{
- float i;
+ int i;
for(i = 0; i < mv_num_maps; ++i)
{
if(mv_avail[i] == GTV_AVAILABLE)
void Ent_MapVote()
{
- float sf;
-
- sf = ReadByte();
+ int sf = ReadByte();
if(sf & 1)
MapVote_Init();
void Net_MapVote_Picture()
{
- float type;
- type = ReadByte();
+ int type = ReadByte();
mv_preview[type] = true;
mv_pics[type] = strzone(ReadPicture());
}
}
}
-void Ent_ModelEffect(float isNew)
+void Ent_ModelEffect(bool isNew)
{
- float f;
- entity e;
-
self.classname = "modeleffect_spawner";
- f = ReadByte();
+ int f = ReadByte();
- e = spawn();
+ entity e = spawn();
e.classname = "modeleffect";
e.model = "from network";
e.modelindex = ReadShort();
.vector move_angles;
.vector move_velocity;
.vector move_avelocity;
-.float move_flags;
+.int move_flags;
.float move_watertype;
.float move_waterlevel;
.void(void) move_touch;
void Movetype_Physics_MatchServer(bool sloppy);
void Movetype_Physics_NoMatchServer();
-const float MOVETYPE_NONE = 0;
-const float MOVETYPE_ANGLENOCLIP = 1;
-const float MOVETYPE_ANGLECLIP = 2;
-const float MOVETYPE_WALK = 3;
-const float MOVETYPE_STEP = 4;
-const float MOVETYPE_FLY = 5;
-const float MOVETYPE_TOSS = 6;
-const float MOVETYPE_PUSH = 7;
-const float MOVETYPE_NOCLIP = 8;
-const float MOVETYPE_FLYMISSILE = 9;
-const float MOVETYPE_BOUNCE = 10;
-const float MOVETYPE_BOUNCEMISSILE = 11; // Like bounce but doesn't lose speed on bouncing
-const float MOVETYPE_FOLLOW = 12;
-const float MOVETYPE_FAKEPUSH = 13;
-const float MOVETYPE_FLY_WORLDONLY = 33;
+const int MOVETYPE_NONE = 0;
+const int MOVETYPE_ANGLENOCLIP = 1;
+const int MOVETYPE_ANGLECLIP = 2;
+const int MOVETYPE_WALK = 3;
+const int MOVETYPE_STEP = 4;
+const int MOVETYPE_FLY = 5;
+const int MOVETYPE_TOSS = 6;
+const int MOVETYPE_PUSH = 7;
+const int MOVETYPE_NOCLIP = 8;
+const int MOVETYPE_FLYMISSILE = 9;
+const int MOVETYPE_BOUNCE = 10;
+const int MOVETYPE_BOUNCEMISSILE = 11; // Like bounce but doesn't lose speed on bouncing
+const int MOVETYPE_FOLLOW = 12;
+const int MOVETYPE_FAKEPUSH = 13;
+const int MOVETYPE_FLY_WORLDONLY = 33;
-const float FL_ITEM = 256;
-const float FL_ONGROUND = 512;
+const int FL_ITEM = 256;
+const int FL_ONGROUND = 512;
entity shownames_ent[255];
void Draw_ShowNames_All()
{
- float i;
+ int i;
for(i = 0; i < maxclients; ++i)
{
float t;
const float TUBA_INSTRUMENTS = 3;
#define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
-.float note; // note
+.int note; // note
.float attenuate; // if set, attenuate it
.float cnt; // current volume
.float count; // initial volume
.float tuba_instrument;
-float Tuba_PitchStep;
+int Tuba_PitchStep;
void tubasound(entity e, float restart)
{
void Ent_TubaNote(float bIsNew)
{
- float f, n, i, att, upd;
+ int f, n, i;
+ float att, upd;
f = ReadByte();
upd = 0;
void Tuba_Precache()
{
- float i, n;
+ float i;
+ int n;
Tuba_PitchStep = autocvar_g_balance_tuba_pitchstep;
if(Tuba_PitchStep)
{
void animdecide_setimplicitstate(entity e, float onground)
{
- float s;
- s = 0;
+ int s = 0;
makevectors(e.angles);
vector v;
entity Buff_Type_last;
.entity enemy; // internal next pointer
-var float BUFF_LAST = 1;
+float BUFF_LAST = 1;
-.float items; // buff ID
+.int items; // buff ID
.string netname; // buff name
.string message; // human readable name
.vector colormod; // buff color
void GenericCommand_macro_write_aliases(float fh);
void Curl_URI_Get_Callback(float id, float status, string data);
-float curl_uri_get_pos;
+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];
ZCTX(_("CI_THI^%d seconds")), /* third */ \
ZCTX(_("CI_MUL^%d seconds"))) /* multi */
-string count_ordinal(float interval)
+string count_ordinal(int interval)
{
// This function is designed primarily for the English language, it's impossible
// to accomodate all languages unless we do a specific function for each one...
return strcasecmp(a, b);
}
-float MapInfo_FilterGametype(float pGametype, float pFeatures, float pFlagsRequired, float pFlagsForbidden, float pAbortOnGenerate)
+float MapInfo_FilterGametype(int pGametype, int pFeatures, int pFlagsRequired, int pFlagsForbidden, bool pAbortOnGenerate)
{
float i, j;
if (!_MapInfo_filtered_allocated)
}
}
-void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, float load_default)
+void _MapInfo_Map_ApplyGametype(string s, int pWantedType, int pThisType, int load_default)
{
string sa;
MapInfo_Map_supportedGametypes |= pThisType;
return FALSE;
}
-void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
+void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType)
{
string sa, k, v;
float p;
}
// load info about a map by name into the MapInfo_Map_* globals
-float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, float pGametypeToSet)
+float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int pGametypeToSet)
{
string fn;
string s, t;
float fh;
- float r, f, n, i, p;
+ int f, i;
+ float r, n, p;
string acl;
acl = MAPINFO_SETTEMP_ACL_USER;
dprint("Map ", pFilename, " supports no game types, ignored\n");
return 0;
}
-float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametypeToSet)
+float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, int pGametypeToSet)
{
float r = MapInfo_Get_ByName_NoFallbacks(pFilename, pAllowGenerate, pGametypeToSet);
float MapInfo_CurrentFeatures()
{
- float req;
- req = 0;
+ int req = 0;
if(!(cvar("g_lms") || cvar("g_instagib") || cvar("g_overkill") || cvar("g_nix") || cvar("g_weaponarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball")))
req |= MAPINFO_FEATURE_WEAPONS;
return req;
float MapInfo_CurrentGametype()
{
- float prev;
entity e;
- prev = cvar("gamecfg");
+ int prev = cvar("gamecfg");
for(e = MapInfo_Type_first; e; e = e.enemy)
if(cvar(e.netname))
if(prev != e.items)
float MapInfo_ForbiddenFlags()
{
- float f;
- f = MAPINFO_FLAG_FORBIDDEN;
+ int f = MAPINFO_FLAG_FORBIDDEN;
#ifndef MENUQC
if (!cvar("g_maplist_allow_hidden"))
float MapInfo_RequiredFlags()
{
- float f;
- f = 0;
+ int f = 0;
if(cvar("g_maplist_allow_frustrating") > 1)
f |= MAPINFO_FLAG_FRUSTRATING;
.float nent_type;
.float nent_id;
.string nent_name;
-.float nent_stringcount;
-.float nent_floatcount;
+.int nent_stringcount;
+.int nent_floatcount;
// MSG_ANNCE entity values
.float nent_channel;
#define MSG_INFO_NOTIF(default,name,strnum,flnum,args,hudargs,icon,normal,gentle) \
NOTIF_ADD_AUTOCVAR(name, default) \
- float name; \
+ int name; \
void RegisterNotification_##name() \
{ \
SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
void Ent_ReadArcBeam(float isnew)
{
- float sf = ReadByte();
+ int sf = ReadByte();
entity flash;
if(isnew)
{
// calculate shot origin offset from gun alignment
- float gunalign = autocvar_cl_gunalign;
+ int gunalign = autocvar_cl_gunalign;
if(gunalign != 1 && gunalign != 2 && gunalign != 4)
gunalign = 3; // default value
--gunalign;
#endif
void register_weapon(
- float id,
+ int id,
WepSet bit,
float(float) func,
.float ammotype,
weaponorder_byid = strcat(weaponorder_byid, " ", ftos(i));
weaponorder_byid = strzone(substring(weaponorder_byid, 1, strlen(weaponorder_byid) - 1));
}
-entity get_weaponinfo(float id)
+entity get_weaponinfo(int id)
{
entity w;
if(id < WEP_FIRST || id > WEP_LAST)
float W_FixWeaponOrder_BuildImpulseList_buf[WEP_MAXCOUNT];
string W_FixWeaponOrder_BuildImpulseList_order;
-void W_FixWeaponOrder_BuildImpulseList_swap(float i, float j, entity pass)
+void W_FixWeaponOrder_BuildImpulseList_swap(int i, int j, entity pass)
{
float h;
h = W_FixWeaponOrder_BuildImpulseList_buf[i];
W_FixWeaponOrder_BuildImpulseList_buf[i] = W_FixWeaponOrder_BuildImpulseList_buf[j];
W_FixWeaponOrder_BuildImpulseList_buf[j] = h;
}
-float W_FixWeaponOrder_BuildImpulseList_cmp(float i, float j, entity pass)
+float W_FixWeaponOrder_BuildImpulseList_cmp(int i, int j, entity pass)
{
entity e1, e2;
float d;
}
string W_FixWeaponOrder_BuildImpulseList(string o)
{
- float i;
+ int i;
W_FixWeaponOrder_BuildImpulseList_order = o;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
W_FixWeaponOrder_BuildImpulseList_buf[i - WEP_FIRST] = i;
#include "calculations.qh"
#endif
-const float MAX_SHOT_DISTANCE = 32768;
+const int MAX_SHOT_DISTANCE = 32768;
// weapon pickup ratings for bot logic
-const float BOT_PICKUP_RATING_LOW = 2500;
-const float BOT_PICKUP_RATING_MID = 5000;
-const float BOT_PICKUP_RATING_HIGH = 10000;
+const int BOT_PICKUP_RATING_LOW = 2500;
+const int BOT_PICKUP_RATING_MID = 5000;
+const int BOT_PICKUP_RATING_HIGH = 10000;
// weapon flags
-const float WEP_TYPE_OTHER = 0x00; // not for damaging people
-const float WEP_TYPE_SPLASH = 0x01; // splash damage
-const float WEP_TYPE_HITSCAN = 0x02; // hitscan
-const float WEP_TYPEMASK = 0x0F;
-const float WEP_FLAG_CANCLIMB = 0x10; // can be used for movement
-const float WEP_FLAG_NORMAL = 0x20; // in "most weapons" set
-const float WEP_FLAG_HIDDEN = 0x40; // hides from menu
-const float WEP_FLAG_RELOADABLE = 0x80; // can has reload
-const float WEP_FLAG_SUPERWEAPON = 0x100; // powerup timer
-const float WEP_FLAG_MUTATORBLOCKED = 0x200; // hides from impulse 99 etc. (mutators are allowed to clear this flag)
+const int WEP_TYPE_OTHER = 0x00; // not for damaging people
+const int WEP_TYPE_SPLASH = 0x01; // splash damage
+const int WEP_TYPE_HITSCAN = 0x02; // hitscan
+const int WEP_TYPEMASK = 0x0F;
+const int WEP_FLAG_CANCLIMB = 0x10; // can be used for movement
+const int WEP_FLAG_NORMAL = 0x20; // in "most weapons" set
+const int WEP_FLAG_HIDDEN = 0x40; // hides from menu
+const int WEP_FLAG_RELOADABLE = 0x80; // can has reload
+const int WEP_FLAG_SUPERWEAPON = 0x100; // powerup timer
+const int WEP_FLAG_MUTATORBLOCKED = 0x200; // hides from impulse 99 etc. (mutators are allowed to clear this flag)
// weapon requests
-const float WR_SETUP = 1; // (SERVER) setup weapon data
-const float WR_THINK = 2; // (SERVER) logic to run every frame
-const float WR_CHECKAMMO1 = 3; // (SERVER) checks ammo for weapon primary
-const float WR_CHECKAMMO2 = 4; // (SERVER) checks ammo for weapon second
-const float WR_AIM = 5; // (SERVER) runs bot aiming code for this weapon
-const float WR_INIT = 6; // (BOTH) precaches models/sounds used by this weapon, also sets up weapon properties
-const float WR_SUICIDEMESSAGE = 7; // (SERVER) notification number for suicide message (may inspect w_deathtype for details)
-const float WR_KILLMESSAGE = 8; // (SERVER) notification number for kill message (may inspect w_deathtype for details)
-const float WR_RELOAD = 9; // (SERVER) handles reloading for weapon
-const float WR_RESETPLAYER = 10; // (SERVER) clears fields that the weapon may use
-const float WR_IMPACTEFFECT = 11; // (CLIENT) impact effect for weapon explosion
-const float WR_PLAYERDEATH = 12; // (SERVER) called whenever a player dies
-const float WR_GONETHINK = 13; // (SERVER) logic to run when weapon is lost
-const float WR_CONFIG = 14; // (ALL) dump weapon cvars to config in data directory (see: sv_cmd dumpweapons)
-const float WR_ZOOMRETICLE = 15; // (CLIENT) weapon specific zoom reticle
-const float WR_DROP = 16; // (SERVER) the weapon is dropped
-const float WR_PICKUP = 17; // (SERVER) a weapon is picked up
+const int WR_SETUP = 1; // (SERVER) setup weapon data
+const int WR_THINK = 2; // (SERVER) logic to run every frame
+const int WR_CHECKAMMO1 = 3; // (SERVER) checks ammo for weapon primary
+const int WR_CHECKAMMO2 = 4; // (SERVER) checks ammo for weapon second
+const int WR_AIM = 5; // (SERVER) runs bot aiming code for this weapon
+const int WR_INIT = 6; // (BOTH) precaches models/sounds used by this weapon, also sets up weapon properties
+const int WR_SUICIDEMESSAGE = 7; // (SERVER) notification number for suicide message (may inspect w_deathtype for details)
+const int WR_KILLMESSAGE = 8; // (SERVER) notification number for kill message (may inspect w_deathtype for details)
+const int WR_RELOAD = 9; // (SERVER) handles reloading for weapon
+const int WR_RESETPLAYER = 10; // (SERVER) clears fields that the weapon may use
+const int WR_IMPACTEFFECT = 11; // (CLIENT) impact effect for weapon explosion
+const int WR_PLAYERDEATH = 12; // (SERVER) called whenever a player dies
+const int WR_GONETHINK = 13; // (SERVER) logic to run when weapon is lost
+const int WR_CONFIG = 14; // (ALL) dump weapon cvars to config in data directory (see: sv_cmd dumpweapons)
+const int WR_ZOOMRETICLE = 15; // (CLIENT) weapon specific zoom reticle
+const int WR_DROP = 16; // (SERVER) the weapon is dropped
+const int WR_PICKUP = 17; // (SERVER) a weapon is picked up
// variables:
string weaponorder_byid;
// weapon name macros
#define WEP_FIRST 1
#define WEP_MAXCOUNT 24 // Increase as needed. Can be up to three times as much.
-float WEP_COUNT;
-float WEP_LAST;
+int WEP_COUNT;
+int WEP_LAST;
WepSet WEPSET_ALL;
WepSet WEPSET_SUPERWEAPONS;
.WepSet weapons; // A: WEPSET_id // WEPSET_...
.float(float) weapon_func; // M: function // w_...
..float ammo_field; // M: ammotype // main ammo field
-.float impulse; // M: impulse // weapon impulse
+.int impulse; // M: impulse // weapon impulse
.float spawnflags; // M: flags // WEPSPAWNFLAG_... combined
.float bot_pickupbasevalue; // M: rating // bot weapon priority
.vector wpcolor; // M: color // waypointsprite color
if(view)
{
- var float refdefflags = 0;
+ int refdefflags = 0;
if(view.csqcmodel_teleported)
refdefflags |= REFDEFFLAG_TELEPORTED;
const float CSQCPLAYERSTATUS_PREDICTED = 2;
// only ever READ these!
-.float pmove_flags;
+.int pmove_flags;
float PMF_JUMP_HELD = 1;
float PMF_DUCKED = 4;
float PMF_ONGROUND = 8;
void InterpolateOrigin_Note()
{
float dt;
- float f0;
+ int f0;
dt = time - self.itime2;
void bumble_raygun_read(float bIsNew)
{
- float sf = ReadByte();
+ int sf = ReadByte();
if(sf & BRG_SETUP)
{
void WarpZone_Read(float isnew)
{
- float f;
-
warpzone_warpzones_exist = 1;
if (!self.enemy)
{
}
self.classname = "trigger_warpzone";
- f = ReadByte();
+ int f = ReadByte();
self.warpzone_isboxy = (f & 1);
if(f & 4)
{
void WarpZone_Camera_Read(float isnew)
{
- float f;
warpzone_cameras_exist = 1;
self.classname = "func_warpzone_camera";
- f = ReadByte();
+ int f = ReadByte();
if(f & 4)
{
self.origin_x = ReadCoord();