From b7c20f9b639cac100cc3de90860d3a1f4f364e1c Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sun, 6 Jan 2013 14:19:12 -0500 Subject: [PATCH] Make this branch semi work with GMQCC --- qcsrc/client/autocvars.qh | 1 - qcsrc/client/hud.qc | 2 +- qcsrc/common/command/generic.qc | 2 +- qcsrc/common/notifications.qc | 13 +++++++------ qcsrc/server/autocvars.qh | 5 ----- qcsrc/server/g_damage.qc | 9 ++++----- qcsrc/server/w_tuba.qc | 2 -- 7 files changed, 13 insertions(+), 21 deletions(-) diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index cb06932e4..387cf44c5 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -251,7 +251,6 @@ float autocvar_hud_panel_notify; float autocvar_hud_panel_notify_fadetime; float autocvar_hud_panel_notify_flip; float autocvar_hud_panel_notify_fontsize; -float autocvar_hud_panel_notify_print; float autocvar_hud_panel_notify_time; float autocvar_hud_panel_physics; float autocvar_hud_panel_physics_acceleration_progressbar_mode; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 74a726d68..d9f783583 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2190,7 +2190,7 @@ void HUD_Notify(void) float width_attacker; string attacker, victim, icon; - float i, j, w, type, step, limit; + float i, j, step, limit; if(autocvar_hud_panel_notify_flip) //order items from the top down { i = 0; diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index e97745cfb..0bc5edede 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -232,7 +232,7 @@ void GenericCommand_dumpnotifs(float request) { case CMD_REQUEST_COMMAND: { - float fh, alsoprint; + float fh, alsoprint = FALSE; string filename = argv(1); diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 89fe61d3c..b4b38e870 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -449,7 +449,7 @@ float NOTIF_WEAPON_COUNT; float NOTIF_DEATH_COUNT; float NOTIF_CPID_COUNT; -#define MSG_INFO_NOTIF(name,strnum,flnum,args,icon,normal,gentle) \ +#define MSG_INFO_NOTIF(name,strnum,flnum,args,hudargs,icon,normal,gentle) \ ADD_CSQC_AUTOCVAR(name) \ float name; \ void RegisterNotification_##name() \ @@ -530,7 +530,7 @@ float notif_checkstring(string input) float notif_stringcount(string s1, string s2) { - float stringcount; + float stringcount = 0; if(s1 != NO_STR_ARG) ++stringcount; if(s2 != NO_STR_ARG) ++stringcount; return stringcount; @@ -538,7 +538,7 @@ float notif_stringcount(string s1, string s2) float notif_floatcount(float f1, float f2, float f3) { - float floatcount; + float floatcount = 0; if(f1 != NO_FL_ARG) ++floatcount; if(f2 != NO_FL_ARG) ++floatcount; if(f3 != NO_FL_ARG) ++floatcount; @@ -548,7 +548,7 @@ float notif_floatcount(float f1, float f2, float f3) // get the actual name of a notification and return it as a string string Get_Field_Value(float field, float net_type, float net_name) { - string output; + string output = ""; #define GET_FIELD_VALUE_OUTPUT(field,name,strnum,flnum) \ if(field == F_NAME) { output = VAR_TO_TEXT(name); } \ @@ -634,7 +634,7 @@ string CCR(string input) #define NOTIF_Write(type,name,text) notif_msg = sprintf("seta %s 1 // %s - %s\n", name, type, strreplace("\n", "\\n", text)); fputs(fh, notif_msg); if(alsoprint) { print(strreplace("^", "^^", notif_msg)); } void Dump_Notifications(float fh, float alsoprint) { - float MSG_INFO_NOTIFS, MSG_CENTER_NOTIFS, MSG_WEAPON_NOTIFS, MSG_DEATH_NOTIFS; + float MSG_INFO_NOTIFS = 0, MSG_CENTER_NOTIFS = 0, MSG_WEAPON_NOTIFS = 0, MSG_DEATH_NOTIFS = 0; string notif_msg; #define MSG_INFO_NOTIF(name,strnum,flnum,args,hudargs,icon,normal,gentle) { ++MSG_INFO_NOTIFS; NOTIF_Write("MSG_INFO", VAR_TO_TEXT(name), normal) } #define MSG_CENTER_NOTIF(name,strnum,flnum,args,cpid,durcnt,normal,gentle) { ++MSG_CENTER_NOTIFS; NOTIF_Write("MSG_CENTER", VAR_TO_TEXT(name), normal) } @@ -781,8 +781,9 @@ void Send_Notification(entity client, float broadcast, float net_type, float net { if(broadcast && net_type && net_name) { - dprint("Send_Notification(", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", s1, ", ", s2, ", ", ftos(f1), strcat(", ", ftos(f2), ", ", ftos(f3), ");\n"))); + dprint("Send_Notification(", ftos(broadcast), ", ", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", s1, ", ", s2, ", ", ftos(f1), strcat(", ", ftos(f2), ", ", ftos(f3), ");\n"))); + print("hmm... ", ftos(net_name), "\n"); float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name)); float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name)); diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 64ce30700..d1930f94a 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -787,7 +787,6 @@ float autocvar_g_ctf_pass_request; float autocvar_g_ctf_pass_turnrate; float autocvar_g_ctf_pass_timelimit; float autocvar_g_ctf_pass_velocity; -float autocvar_g_ctf_captimerecord_always; float autocvar_g_ctf_dynamiclights; string autocvar_g_ctf_flag_blue_model; float autocvar_g_ctf_flag_blue_skin; @@ -1167,10 +1166,6 @@ float autocvar_sv_eventlog_files_counter; string autocvar_sv_eventlog_files_nameprefix; string autocvar_sv_eventlog_files_namesuffix; float autocvar_sv_eventlog_files_timestamps; -float autocvar_sv_fraginfo; -float autocvar_sv_fraginfo_handicap; -float autocvar_sv_fraginfo_ping; -float autocvar_sv_fraginfo_stats; float autocvar_sv_friction; float autocvar_sv_friction_on_land; float autocvar_sv_gameplayfix_q2airaccelerate; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 3807e7ed9..addb32496 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -308,9 +308,11 @@ void LogDeath(string mode, float deathtype, entity killer, entity killed) GameLogEcho(s); } +#define INFO_NO_MSG 0 + void Obituary_SpecialDeath(entity notif_target, float murder, float deathtype, string s1, string s2, float f1, float f2, float f3) { - float handled, hits; + float handled = 0, hits = 0; if(DEATH_ISSPECIAL(deathtype)) { #define DEATHTYPE(name,msg_death,msg_death_by,position) \ @@ -376,12 +378,9 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) if not(targ.classname == STR_PLAYER) { backtrace("Obituary called on non-player?!\n"); return; } // Declarations - string s, a, msg; - float type; - string s1 = NO_STR_ARG, s2 = NO_STR_ARG; float f1 = NO_FL_ARG, f2 = NO_FL_ARG, f3 = NO_FL_ARG; - float notif_firstblood; + float notif_firstblood = FALSE; //dprint(sprintf("Obituary(): Deathtype = %s (%d), Attacker = %s, Inflictor = %s, Target = %s...\n", Deathtype_Name(deathtype), deathtype, attacker.netname, inflictor.netname, targ.netname)); diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index 0c2adbc2d..15d4ef9d7 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -433,8 +433,6 @@ float w_tuba(float req) return WEAPON_KLEINBOTTLE_SUICIDE; else return WEAPON_TUBA_SUICIDE; - - return FALSE; } else if (req == WR_KILLMESSAGE) { -- 2.39.2