void HUD_Main (void)
{
- float i;
+ int i;
// global hud theAlpha fade
if(menu_enabled == 1)
hud_fade_alpha = 1;
-const float HUD_PANEL_MAX = 24;
+const int HUD_PANEL_MAX = 24;
entity hud_panel[HUD_PANEL_MAX];
-const float HUD_PANEL_FIRST = 0;
-float HUD_PANEL_NUM;
-float HUD_PANEL_LAST;
+const int HUD_PANEL_FIRST = 0;
+int HUD_PANEL_NUM;
+int HUD_PANEL_LAST;
-float panel_order[HUD_PANEL_MAX];
+int panel_order[HUD_PANEL_MAX];
string hud_panelorder_prev;
float hud_draw_maximized;
const float BORDER_MULTIPLIER = 0.25;
float scoreboard_bottom;
-float weapon_accuracy[WEP_MAXCOUNT];
+int weapon_accuracy[WEP_MAXCOUNT];
float complain_weapon;
string complain_weapon_name;
float complain_weapon_type;
float complain_weapon_time;
-float ps_primary, ps_secondary;
-float ts_primary, ts_secondary;
+int ps_primary, ps_secondary;
+int ts_primary, ts_secondary;
float last_switchweapon;
float last_activeweapon;
vector hud_configure_gridSize;
vector hud_configure_realGridSize;
-float hudShiftState;
-const float S_SHIFT = 1;
-const float S_CTRL = 2;
-const float S_ALT = 4;
+int hudShiftState;
+const int S_SHIFT = 1;
+const int S_CTRL = 2;
+const int S_ALT = 4;
float menu_enabled; // 1 showing the entire HUD, 2 showing only the clicked panel
entity panel;
.string panel_name;
-.float panel_id;
+.int panel_id;
.vector current_panel_pos;
.vector current_panel_size;
.string current_panel_bg;
HUD_PANEL(BUFFS , HUD_Buffs , buffs)
#define HUD_PANEL(NAME,draw_func,name) \
- float HUD_PANEL_##NAME; \
+ int HUD_PANEL_##NAME; \
void draw_func(void); \
void RegisterHUD_Panel_##NAME() \
{ \
const float NOTIFY_MAX_ENTRIES = 10;
const float NOTIFY_ICON_MARGIN = 0.02;
-float notify_index;
-float notify_count;
+int notify_index;
+int notify_count;
float notify_times[NOTIFY_MAX_ENTRIES];
string notify_attackers[NOTIFY_MAX_ENTRIES];
string notify_victims[NOTIFY_MAX_ENTRIES];
}
}
-void draw_teamradar_link(vector start, vector end, float colors)
+void draw_teamradar_link(vector start, vector end, int colors)
{
vector c0, c1, norm;
void Ent_RadarLink()
{
- float sendflags;
- sendflags = ReadByte();
+ int sendflags = ReadByte();
InterpolateOrigin_Undo();
// to make entities have dots on the team radar
.float teamradar_icon;
.float teamradar_times[MAX_TEAMRADAR_TIMES];
-.float teamradar_time_index;
+.int teamradar_time_index;
.vector teamradar_color;
.float lifetime;
.float fadetime;
.float maxdistance;
-.float hideflags;
+.int hideflags;
.float spawntime;
.float health;
.float build_started;
void Ent_WaypointSprite()
{
- float sendflags, f, t;
+ int sendflags, f, t;
sendflags = ReadByte();
if(!self.spawntime)
.string gametype_description; // game type description
#define REGISTER_GAMETYPE(hname,sname,g_name,NAME,gteamplay,defaults,gdescription) \
- var float MAPINFO_TYPE_##NAME; \
- var entity MapInfo_Type##g_name; \
+ int MAPINFO_TYPE_##NAME; \
+ entity MapInfo_Type##g_name; \
void RegisterGametypes_##g_name() \
{ \
MAPINFO_TYPE_##NAME = MAPINFO_TYPE_ALL + 1; \
REGISTER_GAMETYPE(_("Invasion"),inv,g_invasion,INVASION,FALSE,"pointlimit=50 teams=0",_("Survive against waves of monsters"));
#define g_invasion IS_GAMETYPE(INVASION)
-const float MAPINFO_FEATURE_WEAPONS = 1; // not defined for instagib-only maps
-const float MAPINFO_FEATURE_VEHICLES = 2;
-const float MAPINFO_FEATURE_TURRETS = 4;
-const float MAPINFO_FEATURE_MONSTERS = 8;
+const int MAPINFO_FEATURE_WEAPONS = 1; // not defined for instagib-only maps
+const int MAPINFO_FEATURE_VEHICLES = 2;
+const int MAPINFO_FEATURE_TURRETS = 4;
+const int MAPINFO_FEATURE_MONSTERS = 8;
-const float MAPINFO_FLAG_HIDDEN = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
-const float MAPINFO_FLAG_FORBIDDEN = 2; // don't even allow the map by a cvar setting that allows hidden maps
-const float MAPINFO_FLAG_FRUSTRATING = 4; // this map is near impossible to play, enable at your own risk
-const float MAPINFO_FLAG_NOAUTOMAPLIST = 8; // do not include when automatically building maplist (counts as hidden for maplist building purposes)
+const int MAPINFO_FLAG_HIDDEN = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
+const int MAPINFO_FLAG_FORBIDDEN = 2; // don't even allow the map by a cvar setting that allows hidden maps
+const int MAPINFO_FLAG_FRUSTRATING = 4; // this map is near impossible to play, enable at your own risk
+const int MAPINFO_FLAG_NOAUTOMAPLIST = 8; // do not include when automatically building maplist (counts as hidden for maplist building purposes)
float MapInfo_count;
string MapInfo_Map_author;
string MapInfo_Map_clientstuff; // not in cache, only for map load
string MapInfo_Map_fog; // not in cache, only for map load
-float MapInfo_Map_supportedGametypes;
-float MapInfo_Map_supportedFeatures;
-float MapInfo_Map_flags;
+int MapInfo_Map_supportedGametypes;
+int MapInfo_Map_supportedFeatures;
+int MapInfo_Map_flags;
vector MapInfo_Map_mins; // these are '0 0 0' if not supported!
vector MapInfo_Map_maxs; // these are '0 0 0' if not specified!
// filter the info by game type mask (updates MapInfo_count)
float MapInfo_progress;
float MapInfo_FilterGametype(float gametype, float features, float pFlagsRequired, float pFlagsForbidden, float pAbortOnGenerate); // 1 on success, 0 on temporary failure (call it again next frame then; use MapInfo_progress as progress indicator)
-float MapInfo_CurrentFeatures(); // retrieves currently required features from cvars
-float MapInfo_CurrentGametype(); // retrieves current gametype from cvars
+int MapInfo_CurrentFeatures(); // retrieves currently required features from cvars
+int MapInfo_CurrentGametype(); // retrieves current gametype from cvars
float MapInfo_ForbiddenFlags(); // retrieves current flags from cvars
float MapInfo_RequiredFlags(); // retrieves current flags from cvars
entity monster_info[MON_MAXCOUNT];
entity dummy_monster_info;
-void register_monster(float 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, float monsterflags, vector min_s, vector max_s, string modelname, string shortname, string mname)
{
entity e;
monster_info[id - 1] = e = spawn();
dummy_monster_info.maxs = '0 0 0';
dummy_monster_info.model = "";
}
-entity get_monsterinfo(float id)
+entity get_monsterinfo(int id)
{
entity m;
if(id < MON_FIRST || id > MON_LAST)