float autocvar_cl_effects_lightningarc_drift_start;
float autocvar_cl_effects_lightningarc_segmentlength;
bool autocvar_cl_effects_lightningarc_simple;
-int autocvar_cl_gentle;
+bool autocvar_cl_gentle;
int autocvar_cl_gentle_damage;
int autocvar_cl_gentle_gibs;
int autocvar_cl_gentle_messages;
float autocvar_cl_gibs_damageforcescale = 3.5;
float autocvar_cl_gibs_lifetime = 14;
-float autocvar_cl_gibs_maxcount = 100;
+int autocvar_cl_gibs_maxcount = 100;
bool autocvar_cl_gibs_sloppy = 1;
float autocvar_cl_gibs_ticrate = 0.1;
float autocvar_cl_gibs_velocity_random = 1;
float autocvar_menu_mouse_speed;
string autocvar_menu_skin;
int autocvar_r_fakelight;
-int autocvar_r_fullbright;
+bool autocvar_r_fullbright;
float autocvar_r_letterbox;
string autocvar_scoreboard_columns;
bool autocvar_v_flipped;
-float autocvar_vid_conheight;
-float autocvar_vid_conwidth;
+int autocvar_vid_conheight;
+int autocvar_vid_conwidth;
float autocvar_vid_pixelheight;
float autocvar_viewsize;
bool autocvar_cl_eventchase_vehicle = 1;
float scoreboard_showscores;
float scoreboard_showaccuracy;
.string message;
-.int renderflags;
+.float renderflags;
// float coop;
// float deathmatch;
// Darkplaces Render Modifications
#if 0
.float alpha;
-.float renderflags;
.vector colormod;
.float scale;
#endif
while((s = fgets(fh)) && QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES)
{
// first skip invalid entries, so we don't check them anymore
- float argc;
+ int argc;
argc = tokenize_console(s);
if(argc == 0 || argv(0) == "")
continue;
bool scoreboard_active;
float scoreboard_fade_alpha;
-void Cmd_Scoreboard_SetFields(float argc);
+void Cmd_Scoreboard_SetFields(int argc);
void Scoreboard_Draw();
void Scoreboard_InitScores();
void Scoreboard_UpdatePlayerTeams();
}
.float has_team;
-float SetTeam(entity o, int Team)
+bool SetTeam(entity o, int Team)
{
TC(int, Team);
devassert_once(Team);
{
for(j = 0; j < maxclients; ++j)
if(playerslots[j])
- playerslots[j].ready = 1;
+ playerslots[j].ready = true;
for(i = 1; i <= maxclients; i += 8)
{
f = ReadByte();
for(j = i-1, b = BIT(0); b < BIT(8); b <<= 1, ++j)
if (!(f & b))
if(playerslots[j])
- playerslots[j].ready = 0;
+ playerslots[j].ready = false;
}
}
if (sf & 1) {
for (int j = 0; j < maxclients; ++j) {
if (playerslots[j]) {
- playerslots[j].eliminated = 1;
+ playerslots[j].eliminated = true;
}
}
for (int i = 1; i <= maxclients; i += 8) {
if (f & BIT(b)) continue;
int j = i - 1 + b;
if (playerslots[j]) {
- playerslots[j].eliminated = 0;
+ playerslots[j].eliminated = false;
}
}
}
// Minimap
string minimapname;
-float postinit;
+bool postinit;
entity gametype;
float FONT_USER = 8;
void Gamemode_Init();
-float SetTeam(entity pl, float Team);
+bool SetTeam(entity pl, int Team);
vector hud_fontsize;
entity playerslots[255]; // 255 is engine limit on maxclients
entity teamslots[17]; // 17 teams (including "spectator team")
-.float gotscores;
+.bool gotscores;
.entity owner;
-.float ready;
-.float eliminated;
+.bool ready;
+.bool eliminated;
.void(entity) draw;
IntrusiveList g_drawables;
float current_viewzoom;
float zoomin_effect;
-float warmup_stage;
+bool warmup_stage;
void Fog_Force();
#define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
string vote_called_vote;
-float ready_waiting;
-float ready_waiting_for_me;
-float vote_waiting;
-float vote_waiting_for_me;
+bool ready_waiting;
+bool ready_waiting_for_me;
+bool vote_waiting;
+bool vote_waiting_for_me;
float current_zoomfraction;
-float cs_project_is_b0rked;
-float vid_width, vid_height, vid_pixelheight;
+int cs_project_is_b0rked;
+int vid_width, vid_height;
+float vid_pixelheight;
float camera_active; // Demo camera is active if set to true
float chase_active_backup;
#include <common/constants.qh>
void MapVote_Draw();
-void Cmd_MapVote_MapDownload(float argc);
+void Cmd_MapVote_MapDownload(int argc);
float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary);
// Sets up the campaign for the n-th array item (meaning: campaign_offset+nth
// level) using localcmd()
-void CampaignSetup(float n);
+void CampaignSetup(int n);
// Command Sub-Functions
// =======================
-void GenericCommand_addtolist(float request, float argc)
+void GenericCommand_addtolist(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_qc_curl(float request, float argc)
+void GenericCommand_qc_curl(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_maplist(float request, float argc)
+void GenericCommand_maplist(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_nextframe(float request, float arguments, string command)
+void GenericCommand_nextframe(int request, float arguments, string command)
{
switch(request)
{
}
}
-void GenericCommand_removefromlist(float request, float argc)
+void GenericCommand_removefromlist(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_restartnotifs(float request)
+void GenericCommand_restartnotifs(int request)
{
switch(request)
{
}
}
-void GenericCommand_settemp(float request, float argc)
+void GenericCommand_settemp(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_settemp_restore(float request, float argc)
+void GenericCommand_settemp_restore(int request, int argc)
{
switch(request)
{
}
}
-void GenericCommand_runtest(float request, float argc)
+void GenericCommand_runtest(int request, int argc)
{
switch(request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void GenericCommand_(float request)
+void GenericCommand_(int request)
{
switch(request)
{
FOREACH(GENERIC_COMMANDS, true, LOG_INFOF(" ^2%s^7: %s", it.m_name, it.m_description));
}
-float GenericCommand_macro_command(float argc, string command)
+float GenericCommand_macro_command(int argc, string command)
{
string c = strtolower(argv(0));
FOREACH(GENERIC_COMMANDS, it.m_name == c, {
return false;
}
-float GenericCommand_macro_usage(float argc)
+float GenericCommand_macro_usage(int argc)
{
string c = strtolower(argv(1));
FOREACH(GENERIC_COMMANDS, it.m_name == c, {
float GenericCommand(string command)
{
- float argc = tokenize_console(command);
+ int argc = tokenize_console(command);
float n, j, f, i;
string s, s2, c;
vector rgb;
void GenericCommand_macro_help();
-float GenericCommand_macro_command(float argc, string command);
+float GenericCommand_macro_command(int argc, string command);
-float GenericCommand_macro_usage(float argc);
+float GenericCommand_macro_usage(int argc);
void GenericCommand_macro_write_aliases(float fh);
void rpn_pushf(float f) { return rpn_push(sprintf("%.9g", f)); }
void rpn_setf(float f) { return rpn_set(sprintf("%.9g", f)); }
-void GenericCommand_rpn(float request, float argc, string command)
+void GenericCommand_rpn(int request, int argc, string command)
{
switch(request)
{
int rpn_sp;
string rpn_stack[MAX_RPN_STACK];
-void GenericCommand_rpn(float request, float argc, string command);
+void GenericCommand_rpn(int request, int argc, string command);
return -1; // no control points left?
}
-float Domination_CheckWinner()
+bool Domination_CheckWinner()
{
if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
{
game_stopped = true;
round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
- return 1;
+ return true;
}
Domination_count_controlpoints();
float winner_team = Domination_GetWinnerTeam();
if(winner_team == -1)
- return 0;
+ return false;
if(winner_team > 0)
{
game_stopped = true;
round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
- return 1;
+ return true;
}
-float Domination_CheckPlayers()
+bool Domination_CheckPlayers()
{
- return 1;
+ return true;
}
void Domination_RoundStart()
#define FREEZETAG_ALIVE_TEAMS_OK() (Team_GetNumberOfAliveTeams() == NumTeams(freezetag_teams))
-float freezetag_CheckTeams()
+bool freezetag_CheckTeams()
{
static float prev_missing_teams_mask;
if(FREEZETAG_ALIVE_TEAMS_OK())
if(prev_missing_teams_mask > 0)
Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_MISSING_TEAMS);
prev_missing_teams_mask = -1;
- return 1;
+ return true;
}
if(total_players == 0)
{
if(prev_missing_teams_mask > 0)
Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_MISSING_TEAMS);
prev_missing_teams_mask = -1;
- return 0;
+ return false;
}
int missing_teams_mask = 0;
for (int i = 1; i <= NUM_TEAMS; ++i)
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_MISSING_TEAMS, missing_teams_mask);
prev_missing_teams_mask = missing_teams_mask;
}
- return 0;
+ return false;
}
int freezetag_getWinnerTeam()
void nades_Clear(entity);
void nades_GiveBonus(entity player, float score);
-float freezetag_CheckWinner()
+bool freezetag_CheckWinner()
{
if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
{
});
game_stopped = true;
round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
- return 1;
+ return true;
}
if (Team_GetNumberOfAliveTeams() > 1)
{
- return 0;
+ return false;
}
int winner_team = freezetag_getWinnerTeam();
game_stopped = true;
round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
- return 1;
+ return true;
}
entity freezetag_LastPlayerForTeam(entity this)
freezetag_Add_Score(targ, attacker);
}
-float freezetag_isEliminated(entity e)
+bool freezetag_isEliminated(entity e)
{
if(IS_PLAYER(e) && (STAT(FROZEN, e) == 1 || IS_DEAD(e)))
return true;
classfield(Wall) .vector saved;
// Needed for interactive clientwalls
-.float inactive; // Clientwall disappears when inactive
+.bool inactive; // Clientwall disappears when inactive
.float alpha_max, alpha_min;
// If fade_start > fade_end, fadeout will be inverted
// fade_vertical_offset is a vertival offset for player position
STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); }
.float pushltime;
-.float istypefrag;
+.bool istypefrag;
.float height;
const int NUM_JUMPPADSUSED = 3;
entity WaypointSprite_DeployFixed(
entity spr,
- float limited_range,
+ bool limited_range,
entity player,
vector ofs,
entity icon // initial icon
entity WaypointSprite_Attach(
entity spr,
entity player,
- float limited_range,
+ bool limited_range,
entity icon // initial icon
)
{
.entity waypointsprite_deployed_fixed;
entity WaypointSprite_DeployFixed(
entity spr,
- float limited_range,
+ bool limited_range,
entity player,
vector ofs,
entity icon // initial icon
entity WaypointSprite_Attach(
entity spr,
entity player,
- float limited_range,
+ bool limited_range,
entity icon // initial icon
);
.float swamp_slowdown;
.float lastflags;
.float lastground;
-.float wasFlying;
+.bool wasFlying;
.int buttons_old;
.vector movement_old;
}
}
-void PlayerStats_GameReport_AddTeam(float t)
+void PlayerStats_GameReport_AddTeam(int t)
{
if(PS_GR_OUT_DB < 0) { return; }
strfree(p.playerstats_id);
}
-void PlayerStats_GameReport(float finished)
+void PlayerStats_GameReport(bool finished)
{
if(PS_GR_OUT_DB < 0) { return; }
const string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim";
// delay map switch until this is set
-float PlayerStats_GameReport_DelayMapVote;
+bool PlayerStats_GameReport_DelayMapVote;
// call at initialization
void PlayerStats_GameReport_Init();
return true;
}
-void Item_Show (entity e, float mode)
+void Item_Show (entity e, int mode)
{
e.effects &= ~(EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST);
e.ItemStatus &= ~ITS_STAYWEP;
.float item_respawncounter;
-void Item_Show (entity e, float mode);
+void Item_Show (entity e, int mode);
void Item_Respawn (entity this);
float ammo_pickupevalfunc(entity player, entity item);
float healtharmor_pickupevalfunc(entity player, entity item);
-.float is_item;
+.bool is_item;
.entity itemdef;
void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter);
const string STATIC_NAME_TEAM_4 = "Pink";
#ifdef CSQC
-float teamplay;
-float myteam;
+bool teamplay;
+int myteam;
#endif
-string Team_ColorCode(float teamid)
+string Team_ColorCode(int teamid)
{
switch(teamid)
{
return "^7";
}
-vector Team_ColorRGB(float teamid)
+vector Team_ColorRGB(int teamid)
{
switch(teamid)
{
return '0 0 0';
}
-string Team_ColorName(float teamid)
+string Team_ColorName(int teamid)
{
switch(teamid)
{
}
// used for replacement in filenames or such where the name CANNOT be allowed to be translated
-string Static_Team_ColorName(float teamid)
+string Static_Team_ColorName(int teamid)
{
switch(teamid)
{
const int AI_STATUS_JETPACK_LANDING = BIT(10);
const int AI_STATUS_STUCK = BIT(11); // Cannot reach any goal
-.float isbot; // true if this client is actually a bot
+.bool isbot; // true if this client is actually a bot
.int aistatus;
// Skill system
#else
-.float maycheat;
+.bool maycheat;
float gamestart_sv_cheats;
{
}
-float CheatsAllowed(entity this, float i, float argc, float fr) // the cheat gets passed as argument for possible future ACL checking
+float CheatsAllowed(entity this, float i, int argc, float fr) // the cheat gets passed as argument for possible future ACL checking
{
// dead people cannot cheat
if(IS_DEAD(this))
// Last updated: December 29th, 2011
// =====================================================
-void BanCommand_ban(float request, float argc, string command)
+void BanCommand_ban(int request, int argc, string command)
{
switch (request)
{
}
}
-void BanCommand_banlist(float request)
+void BanCommand_banlist(int request)
{
switch (request)
{
}
}
-void BanCommand_kickban(float request, float argc, string command)
+void BanCommand_kickban(int request, int argc, string command)
{
switch (request)
{
}
}
-void BanCommand_mute(float request, float argc, string command) // TODO: Add a sort of mute-"ban" which allows players to be muted based on IP/cryptokey
+void BanCommand_mute(int request, int argc, string command) // TODO: Add a sort of mute-"ban" which allows players to be muted based on IP/cryptokey
{
switch (request)
{
}
}
-void BanCommand_unban(float request, float argc)
+void BanCommand_unban(int request, int argc)
{
switch (request)
{
}
}
-void BanCommand_unmute(float request, float argc)
+void BanCommand_unmute(int request, int argc)
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void BanCommand_(float request)
+void BanCommand_(int request)
{
switch(request)
{
#undef BAN_COMMAND
}
-float BanCommand_macro_command(float argc, string command)
+float BanCommand_macro_command(int argc, string command)
{
#define BAN_COMMAND(name, function, description) \
{ if (name == strtolower(argv(0))) { function; return true; } }
return false;
}
-float BanCommand_macro_usage(float argc)
+float BanCommand_macro_usage(int argc)
{
#define BAN_COMMAND(name, function, description) \
{ if (name == strtolower(argv(1))) { function; return true; } }
float BanCommand(string command)
{
- float argc = tokenize_console(command);
+ int argc = tokenize_console(command);
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
void BanCommand_macro_write_aliases(float fh);
void BanCommand_macro_help();
-float BanCommand_macro_usage(float argc);
+float BanCommand_macro_usage(int argc);
// Command Sub-Functions
// =======================
-void ClientCommand_autoswitch(entity caller, float request, float argc)
+void ClientCommand_autoswitch(entity caller, int request, int argc)
{
switch (request)
{
}
}
-void ClientCommand_clientversion(entity caller, float request, float argc) // internal command, used only by code
+void ClientCommand_clientversion(entity caller, int request, int argc) // internal command, used only by code
{
switch (request)
{
}
}
-void ClientCommand_mv_getpicture(entity caller, float request, float argc) // internal command, used only by code
+void ClientCommand_mv_getpicture(entity caller, int request, int argc) // internal command, used only by code
{
switch (request)
{
}
}
-void ClientCommand_join(entity caller, float request)
+void ClientCommand_join(entity caller, int request)
{
switch (request)
{
}
}
-void ClientCommand_physics(entity caller, float request, float argc)
+void ClientCommand_physics(entity caller, int request, int argc)
{
switch (request)
{
}
}
-void ClientCommand_ready(entity caller, float request) // todo: anti-spam for toggling readyness
+void ClientCommand_ready(entity caller, int request) // todo: anti-spam for toggling readyness
{
switch (request)
{
}
}
-void ClientCommand_say(entity caller, float request, float argc, string command)
+void ClientCommand_say(entity caller, int request, int argc, string command)
{
switch (request)
{
}
}
-void ClientCommand_say_team(entity caller, float request, float argc, string command)
+void ClientCommand_say_team(entity caller, int request, int argc, string command)
{
switch (request)
{
}
.bool team_selected;
-void ClientCommand_selectteam(entity caller, float request, float argc)
+void ClientCommand_selectteam(entity caller, int request, int argc)
{
switch (request)
{
}
}
-void ClientCommand_selfstuff(entity caller, float request, string command)
+void ClientCommand_selfstuff(entity caller, int request, string command)
{
switch (request)
{
}
}
-void ClientCommand_sentcvar(entity caller, float request, float argc, string command)
+void ClientCommand_sentcvar(entity caller, int request, int argc, string command)
{
switch (request)
{
}
}
-void ClientCommand_spectate(entity caller, float request)
+void ClientCommand_spectate(entity caller, int request)
{
switch (request)
{
}
}
-void ClientCommand_suggestmap(entity caller, float request, float argc)
+void ClientCommand_suggestmap(entity caller, int request, int argc)
{
switch (request)
{
}
}
-void ClientCommand_tell(entity caller, float request, float argc, string command)
+void ClientCommand_tell(entity caller, int request, int argc, string command)
{
switch (request)
{
}
}
-void ClientCommand_voice(entity caller, float request, float argc, string command)
+void ClientCommand_voice(entity caller, int request, int argc, string command)
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void ClientCommand_(entity caller, float request)
+void ClientCommand_(entity caller, int request)
{
switch(request)
{
#undef CLIENT_COMMAND
}
-float ClientCommand_macro_command(float argc, entity caller, string command)
+float ClientCommand_macro_command(int argc, entity caller, string command)
{
#define CLIENT_COMMAND(name, function, description) \
{ if (name == strtolower(argv(0))) { function; return true; } }
return false;
}
-float ClientCommand_macro_usage(float argc, entity caller)
+float ClientCommand_macro_usage(int argc, entity caller)
{
#define CLIENT_COMMAND(name, function, description) \
{ if (name == strtolower(argv(1))) { function; return true; } }
// if we're banned, don't even parse the command
if (Ban_MaybeEnforceBanOnce(this)) return;
- float argc = tokenize_console(command);
+ int argc = tokenize_console(command);
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
else return true;
}
-entity GetIndexedEntity(float argc, float start_index)
+entity GetIndexedEntity(int argc, float start_index)
{
entity selection;
float tmp_number, index;
// Common commands used in both sv_cmd.qc and cmd.qc
// ===================================================
-void CommonCommand_cvar_changes(float request, entity caller)
+void CommonCommand_cvar_changes(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_cvar_purechanges(float request, entity caller)
+void CommonCommand_cvar_purechanges(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_info(float request, entity caller, float argc)
+void CommonCommand_info(int request, entity caller, int argc)
{
switch (request)
{
}
}
-void CommonCommand_ladder(float request, entity caller)
+void CommonCommand_ladder(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_lsmaps(float request, entity caller)
+void CommonCommand_lsmaps(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_printmaplist(float request, entity caller)
+void CommonCommand_printmaplist(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_rankings(float request, entity caller)
+void CommonCommand_rankings(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_records(float request, entity caller)
+void CommonCommand_records(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_teamstatus(float request, entity caller)
+void CommonCommand_teamstatus(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_time(float request, entity caller)
+void CommonCommand_time(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_timein(float request, entity caller)
+void CommonCommand_timein(int request, entity caller)
{
switch (request)
{
}
}
-void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMAND IS TERRIBLE.
+void CommonCommand_timeout(int request, entity caller) // DEAR GOD THIS COMMAND IS TERRIBLE.
{
switch (request)
{
}
}
-void CommonCommand_who(float request, entity caller, float argc)
+void CommonCommand_who(int request, entity caller, int argc)
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void CommonCommand_(float request, entity caller)
+void CommonCommand_(int request, entity caller)
{
switch(request)
{
// is this entity number even in the possible range of entities?
float VerifyClientNumber(float tmp_number);
-entity GetIndexedEntity(float argc, float start_index);
+entity GetIndexedEntity(int argc, float start_index);
// find a player which matches the input string, and return their entity
entity GetFilteredEntity(string input);
// Common commands used in both sv_cmd.qc and cmd.qc
// ===================================================
-void CommonCommand_cvar_changes(float request, entity caller);
+void CommonCommand_cvar_changes(int request, entity caller);
-void CommonCommand_cvar_purechanges(float request, entity caller);
+void CommonCommand_cvar_purechanges(int request, entity caller);
-void CommonCommand_editmob(float request, entity caller, float argc);
+void CommonCommand_editmob(int request, entity caller, int argc);
-void CommonCommand_info(float request, entity caller, float argc);
+void CommonCommand_info(int request, entity caller, int argc);
-void CommonCommand_ladder(float request, entity caller);
+void CommonCommand_ladder(int request, entity caller);
-void CommonCommand_lsmaps(float request, entity caller);
+void CommonCommand_lsmaps(int request, entity caller);
-void CommonCommand_printmaplist(float request, entity caller);
+void CommonCommand_printmaplist(int request, entity caller);
-void CommonCommand_rankings(float request, entity caller);
+void CommonCommand_rankings(int request, entity caller);
-void CommonCommand_records(float request, entity caller);
+void CommonCommand_records(int request, entity caller);
-void CommonCommand_teamstatus(float request, entity caller);
+void CommonCommand_teamstatus(int request, entity caller);
-void CommonCommand_time(float request, entity caller);
+void CommonCommand_time(int request, entity caller);
-void CommonCommand_timein(float request, entity caller);
+void CommonCommand_timein(int request, entity caller);
-void CommonCommand_timeout(float request, entity caller);
+void CommonCommand_timeout(int request, entity caller);
-void CommonCommand_who(float request, entity caller, float argc);
+void CommonCommand_who(int request, entity caller, int argc);
// ==================================
FOREACH(COMMON_COMMANDS, true, { print_to(caller, sprintf(" ^2%s^7: %s", it.m_name, it.m_description)); });
}
-float CommonCommand_macro_command(float argc, entity caller, string command)
+float CommonCommand_macro_command(int argc, entity caller, string command)
{
string c = strtolower(argv(0));
FOREACH(COMMON_COMMANDS, it.m_name == c, {
return false;
}
-float CommonCommand_macro_usage(float argc, entity caller)
+float CommonCommand_macro_usage(int argc, entity caller)
{
string c = strtolower(argv(1));
FOREACH(COMMON_COMMANDS, it.m_name == c, {
}
}
-bool RadarMap_Make(float argc)
+bool RadarMap_Make(int argc)
{
float i;
#pragma once
#ifndef RADARMAP
-bool RadarMap_Make(float argc) { LOG_INFO("radarmap is disabled, compile with -DRADARMAP to enable it."); return true; }
+bool RadarMap_Make(int argc) { LOG_INFO("radarmap is disabled, compile with -DRADARMAP to enable it."); return true; }
#else
// ===========================================
// FF is contained twice, to map 256 to FF too
// removes the need to bound()
-bool RadarMap_Make(float argc);
+bool RadarMap_Make(int argc);
#endif
// Command Sub-Functions
// =======================
-void GameCommand_adminmsg(float request, float argc)
+void GameCommand_adminmsg(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_allready(float request)
+void GameCommand_allready(int request)
{
switch (request)
{
}
}
-void GameCommand_allspec(float request, float argc)
+void GameCommand_allspec(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_anticheat(float request, float argc)
+void GameCommand_anticheat(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_bbox(float request)
+void GameCommand_bbox(int request)
{
switch (request)
{
}
}
-void GameCommand_bot_cmd(float request, float argc, string command)
+void GameCommand_bot_cmd(int request, int argc, string command)
{
switch (request)
{
}
}
-void GameCommand_cointoss(float request, float argc)
+void GameCommand_cointoss(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_database(float request, float argc)
+void GameCommand_database(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_defer_clear(float request, float argc)
+void GameCommand_defer_clear(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_defer_clear_all(float request)
+void GameCommand_defer_clear_all(int request)
{
switch (request)
{
case CMD_REQUEST_COMMAND:
{
int n = 0;
- float argc;
+ int argc;
FOREACH_CLIENT(true, {
argc = tokenize_console(strcat("defer_clear ", ftos(etof(it))));
}
}
-void GameCommand_delrec(float request, float argc) // perhaps merge later with records and printstats and such?
+void GameCommand_delrec(int request, int argc) // perhaps merge later with records and printstats and such?
{
switch (request)
{
}
}
-void GameCommand_effectindexdump(float request)
+void GameCommand_effectindexdump(int request)
{
switch (request)
{
}
}
-void GameCommand_extendmatchtime(float request)
+void GameCommand_extendmatchtime(int request)
{
switch (request)
{
}
}
-void GameCommand_gametype(float request, float argc)
+void GameCommand_gametype(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_gettaginfo(float request, float argc)
+void GameCommand_gettaginfo(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_animbench(float request, float argc)
+void GameCommand_animbench(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_gotomap(float request, float argc)
+void GameCommand_gotomap(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_lockteams(float request)
+void GameCommand_lockteams(int request)
{
switch (request)
{
}
}
-void GameCommand_make_mapinfo(float request)
+void GameCommand_make_mapinfo(int request)
{
switch (request)
{
}
}
-void GameCommand_moveplayer(float request, float argc)
+void GameCommand_moveplayer(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_nospectators(float request)
+void GameCommand_nospectators(int request)
{
switch (request)
{
}
}
-void GameCommand_printstats(float request)
+void GameCommand_printstats(int request)
{
switch (request)
{
}
}
-void GameCommand_radarmap(float request, float argc)
+void GameCommand_radarmap(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_reducematchtime(float request)
+void GameCommand_reducematchtime(int request)
{
switch (request)
{
}
}
-void GameCommand_setbots(float request, float argc)
+void GameCommand_setbots(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_shuffleteams(float request)
+void GameCommand_shuffleteams(int request)
{
switch (request)
{
}
}
-void GameCommand_stuffto(float request, float argc)
+void GameCommand_stuffto(int request, int argc)
{
// This... is a fairly dangerous and powerful command... - It allows any arguments to be sent to a client via rcon.
// Because of this, it is disabled by default and must be enabled by the server owner when doing compilation. That way,
#endif
}
-void GameCommand_trace(float request, float argc)
+void GameCommand_trace(int request, int argc)
{
switch (request)
{
}
}
-void GameCommand_unlockteams(float request)
+void GameCommand_unlockteams(int request)
{
switch (request)
{
}
}
-void GameCommand_warp(float request, float argc)
+void GameCommand_warp(int request, int argc)
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void GameCommand_(float request)
+void GameCommand_(int request)
{
switch(request)
{
FOREACH(SERVER_COMMANDS, true, { LOG_INFOF(" ^2%s^7: %s", it.m_name, it.m_description); });
}
-float GameCommand_macro_command(float argc, string command)
+float GameCommand_macro_command(int argc, string command)
{
string c = strtolower(argv(0));
FOREACH(SERVER_COMMANDS, it.m_name == c, {
return false;
}
-float GameCommand_macro_usage(float argc)
+float GameCommand_macro_usage(int argc)
{
string c = strtolower(argv(1));
FOREACH(SERVER_COMMANDS, it.m_name == c, {
void GameCommand(string command)
{
- float argc = tokenize_console(command);
+ int argc = tokenize_console(command);
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
return false;
}
-string VoteCommand_extractcommand(string input, float startpos, float argc)
+string VoteCommand_extractcommand(string input, float startpos, int argc)
{
string output;
return validated_map;
}
-float VoteCommand_checkargs(float startpos, float argc)
+float VoteCommand_checkargs(float startpos, int argc)
{
float p, q, check, minargs;
string cvarname = strcat("sv_vote_command_restriction_", argv(startpos));
return true;
}
-int VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc)
+int VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, int argc)
{
string first_command = argv(startpos);
int missing_chars = argv_start_index(startpos);
// Command Sub-Functions
// =======================
-void VoteCommand_abstain(float request, entity caller) // CLIENT ONLY
+void VoteCommand_abstain(int request, entity caller) // CLIENT ONLY
{
switch (request)
{
}
}
-void VoteCommand_call(float request, entity caller, float argc, string vote_command) // BOTH
+void VoteCommand_call(int request, entity caller, int argc, string vote_command) // BOTH
{
switch (request)
{
}
}
-void VoteCommand_master(float request, entity caller, float argc, string vote_command) // CLIENT ONLY
+void VoteCommand_master(int request, entity caller, int argc, string vote_command) // CLIENT ONLY
{
switch (request)
{
}
}
-void VoteCommand_no(float request, entity caller) // CLIENT ONLY
+void VoteCommand_no(int request, entity caller) // CLIENT ONLY
{
switch (request)
{
}
}
-void VoteCommand_status(float request, entity caller) // BOTH
+void VoteCommand_status(int request, entity caller) // BOTH
{
switch (request)
{
}
}
-void VoteCommand_stop(float request, entity caller) // BOTH
+void VoteCommand_stop(int request, entity caller) // BOTH
{
switch (request)
{
}
}
-void VoteCommand_yes(float request, entity caller) // CLIENT ONLY
+void VoteCommand_yes(int request, entity caller) // CLIENT ONLY
{
switch (request)
{
/* use this when creating a new command, making sure to place it in alphabetical order... also,
** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void VoteCommand_(float request)
+void VoteCommand_(int request)
{
switch(request)
{
VOTE_COMMAND("yes", VoteCommand_yes(request, caller), "Select yes in current vote", VC_ASGNMNT_CLIENTONLY) \
/* nothing */
-void VoteCommand_macro_help(entity caller, float argc)
+void VoteCommand_macro_help(entity caller, int argc)
{
string command_origin = GetCommandPrefix(caller);
}
}
-float VoteCommand_macro_command(entity caller, float argc, string vote_command)
+float VoteCommand_macro_command(entity caller, int argc, string vote_command)
{
#define VOTE_COMMAND(name, function, description, assignment) \
{ if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(1))) { function; return true; } } }
// Main function handling vote commands
// ======================================
-void VoteCommand(float request, entity caller, float argc, string vote_command)
+void VoteCommand(int request, entity caller, int argc, string vote_command)
{
// Guide for working with argc arguments by example:
// argc: 1 - 2 - 3 - 4
// allow functions to be used in other code like g_world.qc and teamplay.qc
void VoteThink();
void VoteReset();
-void VoteCommand(float request, entity caller, float argc, string vote_command);
+void VoteCommand(int request, entity caller, int argc, string vote_command);
// warmup and nagger stuff
const float RESTART_COUNTDOWN = 10;
float bots_would_leave;
void UpdateFrags(entity player, int f);
-.float totalfrags;
+.int totalfrags;
// flag set on worldspawn so that the code knows if it is dedicated or not
float server_is_dedicated;
//.float worldtype;
// Needed for dynamic clientwalls
-.float inactive; // Clientwall disappears when inactive
+.bool inactive; // Clientwall disappears when inactive
.float alpha_max, alpha_min;
.float fade_start, fade_end, fade_vertical_offset;
.float default_solid; // Variable to store default .solid for clientwalls
float ServerProgsDB;
float TemporaryDB;
-.float team_saved;
+.int team_saved;
bool some_spawn_has_been_used;
int have_team_spawns; // 0 = no team spawns requested, -1 = team spawns requested but none found, 1 = team spawns requested and found
.float weapon_load[Weapons_MAX];
.int ammo_none; // used by the reloading system, must always be 0
-.float clip_load;
-.float old_clip_load;
-.float clip_size;
+.int clip_load;
+.int old_clip_load;
+.int clip_size;
.int minelayer_mines;
.float vortex_charge;
// when doing this, hagar can go through clones
// #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
-.float spectatee_status;
-.float zoomstate;
-.float restriction;
+.int spectatee_status;
+.bool zoomstate;
+.int restriction;
.entity clientdata;
.entity personal;
.bool just_joined;
.float cvar_cl_weaponimpulsemode;
-.float selectweapon; // last selected weapon of the player
+.int selectweapon; // last selected weapon of the player
.float ballistics_density; // wall piercing factor, larger = bullet can pass through more
-const float ACTIVE_NOT = 0;
-const float ACTIVE_ACTIVE = 1;
-const float ACTIVE_IDLE = 2;
-const float ACTIVE_BUSY = 2;
-const float ACTIVE_TOGGLE = 3;
-.float active;
+const int ACTIVE_NOT = 0;
+const int ACTIVE_ACTIVE = 1;
+const int ACTIVE_IDLE = 2;
+const int ACTIVE_BUSY = 2;
+const int ACTIVE_TOGGLE = 3;
+.int active;
.void (entity this, int act_state) setactive;
.entity realowner;
//float serverflags;
-.float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
+.int team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
-.float player_blocked;
+.bool player_blocked;
.float revival_time; // time at which player was last revived
.float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
string modname;
-.float missile_flags;
+.int missile_flags;
const int MIF_SPLASH = BIT(1);
const int MIF_ARC = BIT(2);
const int MIF_PROXY = BIT(3);
.float teamkill_soundtime;
.entity teamkill_soundsource;
.entity pusher;
-.float istypefrag;
+.bool istypefrag;
.float taunt_soundtime;
float IsFlying(entity a);
void OnlineBanList_Think(entity this)
{
- float argc;
+ int argc;
string uri;
float i, n;
builtin_remove(e);
}
-void InitializeEntity(entity e, void(entity this) func, float order)
+void InitializeEntity(entity e, void(entity this) func, int order)
{
entity prev, cur;
//#NO AUTOCVARS END
-const float INITPRIO_FIRST = 0;
-const float INITPRIO_GAMETYPE = 0;
-const float INITPRIO_GAMETYPE_FALLBACK = 1;
-const float INITPRIO_FINDTARGET = 10;
-const float INITPRIO_DROPTOFLOOR = 20;
-const float INITPRIO_SETLOCATION = 90;
-const float INITPRIO_LINKDOORS = 91;
-const float INITPRIO_LAST = 99;
+const int INITPRIO_FIRST = 0;
+const int INITPRIO_GAMETYPE = 0;
+const int INITPRIO_GAMETYPE_FALLBACK = 1;
+const int INITPRIO_FINDTARGET = 10;
+const int INITPRIO_DROPTOFLOOR = 20;
+const int INITPRIO_SETLOCATION = 90;
+const int INITPRIO_LINKDOORS = 91;
+const int INITPRIO_LAST = 99;
.void(entity this) initialize_entity;
-.float initialize_entity_order;
+.int initialize_entity_order;
.entity initialize_entity_next;
entity initialize_entity_first;
-float sound_allowed(float dest, entity e);
-void InitializeEntity(entity e, void(entity this) func, float order);
+bool sound_allowed(int dest, entity e);
+void InitializeEntity(entity e, void(entity this) func, int order);
IntrusiveList g_ctrace_changed;
STATIC_INIT(g_ctrace_changed) { g_ctrace_changed = IL_NEW(); }
.entity pusher;
.float pushltime;
-.float istypefrag;
+.bool istypefrag;
.float CopyBody_nextthink;
.void(entity this) CopyBody_think;
this.nextthink = max(time, game_starttime);
}
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func)
+void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func)
{
if (round_handler)
{
entity round_handler;
.float delay; // stores delay from round end to countdown start
.float count; // stores initial number of the countdown
-.float wait; // it's set to true when round ends, to false when countdown starts
+.bool wait; // it's set to true when round ends, to false when countdown starts
.float cnt; // its initial value is .count + 1, then decreased while counting down
// reaches 0 when the round starts
.float round_timelimit;
.float round_endtime;
-.float() canRoundStart;
-.float() canRoundEnd;
+.bool() canRoundStart;
+.bool() canRoundEnd;
.void() roundStart;
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit);
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func);
+void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func);
void round_handler_Reset(float next_think);
void round_handler_Remove();