cvar_set(e.netname, e.message);
}
-void() menu_show_error =
+void menu_show_error()
{
drawstring('0 200 0', _("ERROR - MENU IS VISIBLE BUT NO MENU WAS DEFINED!"), '8 8 0', '1 0 0', 1, 0);
-};
+}
// CSQC_Init : Called every time the CSQC code is initialized (essentially at map load)
// Useful for precaching things
-void() menu_sub_null =
+void menu_sub_null()
{
-};
+}
#ifdef USE_FTE
float __engine_check;
break;
maxclients = i;
- //ctf_temp_1 = "";
- // localcmd("alias order \"cmd order $*\""); enable if ctf-command thingy is used
- //registercmd("ctf_menu");
- registercmd("ons_map");
registercmd("hud_configure");
registercmd("hud_save");
//registercmd("menu_action");
cl_announcer_prev = strzone(autocvar_cl_announcer);
}
Tuba_Precache();
-
- if(autocvar_cl_reticle_item_normal) precache_pic("gfx/reticle_normal");
- if(autocvar_cl_reticle_item_nex) precache_pic("gfx/reticle_nex");
-
+
+ if(autocvar_cl_reticle)
+ {
+ if(autocvar_cl_reticle_item_normal) { precache_pic("gfx/reticle_normal"); }
+ if(autocvar_cl_reticle_item_nex) { precache_pic("gfx/reticle_nex"); }
+ }
+
get_mi_min_max_texcoords(1); // try the CLEVER way first
minimapname = strcat("gfx/", mi_shortname, "_radar.tga");
shortmapname = mi_shortname;
{
float argc;
// Tokenize String
- //argc = tokenize(strMessage);
argc = tokenize_console(strMessage);
// Acquire Command
- local string strCmd;
+ string strCmd;
strCmd = argv(0);
if(strCmd == "hud_configure") { // config hud
if(cmd == "mv_download") {
Cmd_MapVote_MapDownload(argc);
}
+ else if(cmd == "hud_panel_radar_maximized")
+ {
+ if(argc == 1)
+ hud_panel_radar_maximized = !hud_panel_radar_maximized;
+ else
+ hud_panel_radar_maximized = (stof(argv(1)) != 0);
+ }
else if(cmd == "settemp") {
cvar_clientsettemp(argv(1), argv(2));
}
// In the case of mouse input, nPrimary is xdelta, nSecondary is ydelta.
float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
{
- local float bSkipKey;
+ float bSkipKey;
bSkipKey = false;
if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
void Ent_RadarLink();
void Ent_Init();
void Ent_ScoresInfo();
-void(float bIsNewEntity) CSQC_Ent_Update =
+void CSQC_Ent_Update(float bIsNewEntity)
{
float t;
float savetime;
#ifdef DP_CSQC_ENTITY_REMOVE_IS_B0RKED
if(self.enttype)
- if(t != self.enttype)
+ {
+ if(t != self.enttype || bIsNewEntity)
{
//print(_("A CSQC entity changed its type!\n"));
- print(sprintf(_("A CSQC entity changed its type! (edict: %d, classname: %s)\n"), num_for_edict(self), self.classname));
+ print(sprintf(_("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n"), num_for_edict(self), self.entnum, self.enttype, t));
Ent_Remove();
bIsNewEntity = 1;
}
+ }
+ else
+ {
+ if(!bIsNewEntity)
+ {
+ print(sprintf(_("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n"), num_for_edict(self), self.entnum, t));
+ bIsNewEntity = 1;
+ }
+ }
#endif
self.enttype = t;
switch(t)
}
time = savetime;
-};
+}
// Destructor, but does NOT deallocate the entity by calling remove(). Also
// used when an entity changes its type. For an entity that someone interacts
// with others, make sure it can no longer do so.
// Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
float CSQC_Parse_TempEntity()
{
- local float bHandled;
+ float bHandled;
bHandled = true;
// Acquire TE ID
- local float nTEID;
+ float nTEID;
nTEID = ReadByte();
// NOTE: Could just do return instead of break...