registercmd("hud_save");
//registercmd("menu_action");
- registercmd("+button3");
- registercmd("-button3");
- registercmd("+button4");
- registercmd("-button4");
registercmd("+showscores");registercmd("-showscores");
registercmd("+showaccuracy");registercmd("-showaccuracy");
minimapname = strzone(minimapname);
WarpZone_Init();
+
hud_configure_prev = -1;
+ tab_panel = -1;
}
// CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc)
else
HUD_Panel_ExportCfg(argv(1));
return true;
- } else if(strCmd == "+button4") { // zoom
- // return false, because the message shall be sent to the server anyway (for demos/speccing)
- if(ignore_plus_zoom)
- {
- --ignore_plus_zoom;
- return false;
- }
- button_zoom = 1;
- return true;
- } else if(strCmd == "-button4") { // zoom
- if(ignore_minus_zoom)
- {
- --ignore_minus_zoom;
- return false;
- }
- button_zoom = 0;
- return true;
- } else if(strCmd == "+button3") { // secondary
- button_attack2 = 1;
- return false;
- } else if(strCmd == "-button3") { // secondary
- button_attack2 = 0;
- return false;
} else if(strCmd == "+showscores") {
scoreboard_showscores = true;
return true;
vote_prev = 0;
cvar_set("cl_allow_uid2name", "1");
vote_change = -9999;
+ uid2name_dialog = 0;
}
else
{
vote_prev = 0;
cvar_set("cl_allow_uid2name", "0");
vote_change = -9999;
+ uid2name_dialog = 0;
}
else
{
// --------------------------------------------------------------------------
// BEGIN OPTIONAL CSQC FUNCTIONS
+void Ent_RemoveEntCS()
+{
+ entcs_receiver[self.sv_entnum] = world;
+}
void Ent_ReadEntCS()
{
+ float sf;
InterpolateOrigin_Undo();
self.classname = "entcs_receiver";
- self.sv_entnum = ReadByte() - 1;
- self.origin_x = ReadShort();
- self.origin_y = ReadShort();
- self.origin_z = ReadShort();
- self.angles_y = ReadByte() * 360.0 / 256;
- self.origin_z = self.angles_x = self.angles_z = 0;
+ sf = ReadByte();
+
+ if(sf & 1)
+ self.sv_entnum = ReadByte();
+ if(sf & 2)
+ {
+ self.origin_x = ReadShort();
+ self.origin_y = ReadShort();
+ self.origin_z = ReadShort();
+ }
+ if(sf & 4)
+ {
+ self.angles_y = ReadByte() * 360.0 / 256;
+ self.angles_x = self.angles_z = 0;
+ }
+ if(sf & 8)
+ self.healthvalue = ReadByte() * 10;
+ if(sf & 16)
+ self.armorvalue = ReadByte() * 10;
+
+ entcs_receiver[self.sv_entnum] = self;
+ self.entremove = Ent_RemoveEntCS;
InterpolateOrigin_Note();
}
HUD_UpdateTeamPos(o);
}
-void Net_Reset()
-{
-}
-
void Ent_ClientData()
{
float f;
race_laptime = 0;
race_checkpointtime = 0;
}
+ if (autocvar_hud_panel_healtharmor_progressbar_gfx)
+ {
+ if ( (spectatee_status == -1 && newspectatee_status > 0) //before observing, now spectating
+ || (spectatee_status > 0 && newspectatee_status > 0 && spectatee_status != newspectatee_status) //changed spectated player
+ )
+ prev_p_health = -1;
+ else if(spectatee_status && !newspectatee_status) //before observing/spectating, now playing
+ prev_health = -1;
+ }
spectatee_status = newspectatee_status;
}
case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break;
case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break;
case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
+ case ENT_CLIENT_DAMAGEEFFECT: Ent_DamageEffect(); break;
default:
//error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));
void Gamemode_Init()
{
- if(gametype == GAME_ONSLAUGHT) {
- print(strcat("Using ", minimapname, " as minimap.\n"));
- precache_pic("gfx/ons-cp-neutral.tga");
- precache_pic("gfx/ons-cp-red.tga");
- precache_pic("gfx/ons-cp-blue.tga");
- precache_pic("gfx/ons-frame.tga");
- precache_pic("gfx/ons-frame-team.tga");
- }
-
if not(isdemo())
{
localcmd("\n_cl_hook_gamestart ", GametypeNameFromType(gametype), "\n");
minelayer_maxmines = ReadByte();
+ hagar_maxrockets = ReadByte();
+
g_trueaim_minrange = ReadCoord();
if(!postinit)
string keys;
float n, j, k, l;
- if (!hud_showbinds)
+ if (!autocvar_hud_showbinds)
return text;
keys = db_get(binddb, command);
keys = strcat(keys, ", ", keynumtostring(k));
++l;
- if (hud_showbinds_limit > 0 && hud_showbinds_limit >= l) break;
+ if (autocvar_hud_showbinds_limit > 0 && autocvar_hud_showbinds_limit >= l) break;
}
}
}
if ("" == keys) {
- if (hud_showbinds > 1)
+ if (autocvar_hud_showbinds > 1)
return sprintf(_("%s (not bound)"), text);
else
return text;
}
- else if (hud_showbinds > 1)
+ else if (autocvar_hud_showbinds > 1)
return sprintf(_("%s (%s)"), text, keys);
else
return keys;