check_unacceptable_compiler_bugs();
+#ifdef WATERMARK
+ print("^4CSQC Build information: ", WATERMARK(), "\n");
+#endif
+
float i;
CSQC_CheckEngine();
// 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");
registercmd("+button3");
local string strCmd;
strCmd = argv(0);
- if(strCmd == "+button4") { // zoom
+ if(strCmd == "hud_configure") { // config hud
+ cvar_set("_hud_configure", ftos(!cvar("_hud_configure")));
+ return true;
+ } else if(strCmd == "hud_save") { // save hud config
+ if(argv(1) == "" || argv(2)) {
+ print("Usage:\n");
+ print("hud_save configname (saves to hud_skinname_configname.cfg)\n");
+ }
+ 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)
{
{
print("Usage: cl_cmd COMMAND..., where possible commands are:\n");
print(" settemp cvar value\n");
- print(" radar\n");
print(" hud_columns_set ...\n");
print(" hud_columns_help\n");
GameCommand_Generic("help");
else if(cmd == "settemp") {
cvar_clientsettemp(argv(1), argv(2));
}
- else if(cmd == "radar") {
- ons_showmap = !ons_showmap;
- }
else if(cmd == "hud_columns_set") {
Cmd_HUD_SetFields(argc);
}
localcmd("sv_cmd debug_shotorg\n");
}
else if(cmd == "sendcvar") {
- s = cvar_string(argv(1));
- if(argv(1) == "cl_weaponpriority")
+ // W_FixWeaponOrder will trash argv, so save what we need.
+ string thiscvar;
+ thiscvar = strzone(argv(1));
+ s = cvar_string(thiscvar);
+ if(thiscvar == "cl_weaponpriority")
s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 1);
- else if(substring(argv(1), 0, 17) == "cl_weaponpriority" && strlen(argv(1)) == 18)
+ else if(substring(thiscvar, 0, 17) == "cl_weaponpriority" && strlen(thiscvar) == 18)
s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 0);
- localcmd("cmd sentcvar ", argv(1), " \"", s, "\"\n");
+ localcmd("cmd sentcvar ", thiscvar, " \"", s, "\"\n");
+ strunzone(thiscvar);
}
else if(cmd == "spawn") {
s = argv(1);
g_weaponswitchdelay = ReadByte() / 255.0;
+ g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord();
+ g_balance_grenadelauncher_secondary_bouncestop = ReadCoord();
+
if(!postinit)
PostInit();
}
vote_active = 0;
}
+void Net_Notify() {
+ float type;
+ type = ReadByte();
+
+ if(type == CSQC_KILLNOTIFY)
+ {
+ HUD_KillNotify(ReadString(), ReadString(), ReadByte());
+ }
+ else if(type == CSQC_CENTERPRINT)
+ {
+ HUD_Centerprint(ReadString(), ReadByte());
+ }
+}
+
// CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
// You must ALWAYS first acquire the temporary ID, which is sent as a byte.
// Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
announce_snd = strzone(ReadString());
bHandled = true;
break;
+ case TE_CSQC_NOTIFY:
+ Net_Notify();
+ bHandled = true;
+ break;
default:
// No special logic for this temporary entity; return 0 so the engine can handle it
bHandled = false;