From: Mario Date: Thu, 31 Dec 2015 19:15:43 +0000 (+1000) Subject: Remove another useless debug function X-Git-Tag: xonotic-v0.8.2~1343 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1efbe1eee4596e80e81374abcc6de6930d3add79;p=xonotic%2Fxonotic-data.pk3dir.git Remove another useless debug function --- diff --git a/gamemodes.cfg b/gamemodes.cfg index 3952ab06b..ee94e936a 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -502,7 +502,6 @@ set g_onslaught 0 "Onslaught: take control points towards the enemy generator an set g_onslaught_point_limit 1 "Onslaught point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)" set g_onslaught_warmup 5 set g_onslaught_round_timelimit 280 -set g_onslaught_debug 0 "show debug prints in onslaught" set g_onslaught_teleport_radius 200 "Allows teleporting from a control point to another" set g_onslaught_teleport_wait 5 "Time before player can teleport again" set g_onslaught_spawn_choose 1 "Allow players to choose the control point to be spawned at" diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc index 64192cbcd..c0f2eac21 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc @@ -133,7 +133,6 @@ const int SP_ONS_TAKES = 6; bool g_onslaught; -float autocvar_g_onslaught_debug; float autocvar_g_onslaught_teleport_wait; bool autocvar_g_onslaught_spawn_at_controlpoints; bool autocvar_g_onslaught_spawn_at_generator; @@ -229,15 +228,6 @@ void ons_CaptureShield_Spawn(entity generator, bool is_generator) // Junk Pile // ========== -void ons_debug(string input) -{ - switch(autocvar_g_onslaught_debug) - { - case 1: LOG_TRACE(input); break; - case 2: LOG_INFO(input); break; - } -} - void setmodel_fixsize(entity e, Model m) { setmodel(e, m); @@ -248,14 +238,14 @@ void onslaught_updatelinks() { entity l; // first check if the game has ended - ons_debug("--- updatelinks ---\n"); + LOG_DEBUG("--- updatelinks ---\n"); // mark generators as being shielded and networked for(l = ons_worldgeneratorlist; l; l = l.ons_worldgeneratornext) { if (l.iscaptured) - ons_debug(strcat(etos(l), " (generator) belongs to team ", ftos(l.team), "\n")); + LOG_DEBUG(strcat(etos(l), " (generator) belongs to team ", ftos(l.team), "\n")); else - ons_debug(strcat(etos(l), " (generator) is destroyed\n")); + LOG_DEBUG(strcat(etos(l), " (generator) is destroyed\n")); l.islinked = l.iscaptured; l.isshielded = l.iscaptured; l.sprite.SendFlags |= 16; @@ -267,7 +257,7 @@ void onslaught_updatelinks() l.isshielded = true; int i; for(i = 0; i < 17; ++i) { l.isgenneighbor[i] = false; l.iscpneighbor[i] = false; } - ons_debug(strcat(etos(l), " (point) belongs to team ", ftos(l.team), "\n")); + LOG_DEBUG(strcat(etos(l), " (point) belongs to team ", ftos(l.team), "\n")); l.sprite.SendFlags |= 16; } // flow power outward from the generators through the network @@ -287,13 +277,13 @@ void onslaught_updatelinks() { stop = false; l.goalentity.islinked = true; - ons_debug(strcat(etos(l), " (link) is marking ", etos(l.goalentity), " (point) because its team matches ", etos(l.enemy), " (point)\n")); + LOG_DEBUG(strcat(etos(l), " (link) is marking ", etos(l.goalentity), " (point) because its team matches ", etos(l.enemy), " (point)\n")); } else if (!l.enemy.islinked) { stop = false; l.enemy.islinked = true; - ons_debug(strcat(etos(l), " (link) is marking ", etos(l.enemy), " (point) because its team matches ", etos(l.goalentity), " (point)\n")); + LOG_DEBUG(strcat(etos(l), " (link) is marking ", etos(l.enemy), " (point) because its team matches ", etos(l.goalentity), " (point)\n")); } } } @@ -306,7 +296,7 @@ void onslaught_updatelinks() { if(DIFF_TEAM(l.goalentity, l.enemy)) { - ons_debug(strcat(etos(l), " (link) is unshielding ", etos(l.enemy), " (point) because its team does not match ", etos(l.goalentity), " (point)\n")); + LOG_DEBUG(strcat(etos(l), " (link) is unshielding ", etos(l.enemy), " (point) because its team does not match ", etos(l.goalentity), " (point)\n")); l.enemy.isshielded = false; } if(l.goalentity.classname == "onslaught_generator") @@ -318,7 +308,7 @@ void onslaught_updatelinks() { if(DIFF_TEAM(l.goalentity, l.enemy)) { - ons_debug(strcat(etos(l), " (link) is unshielding ", etos(l.goalentity), " (point) because its team does not match ", etos(l.enemy), " (point)\n")); + LOG_DEBUG(strcat(etos(l), " (link) is unshielding ", etos(l.goalentity), " (point) because its team does not match ", etos(l.enemy), " (point)\n")); l.goalentity.isshielded = false; } if(l.enemy.classname == "onslaught_generator") @@ -332,13 +322,13 @@ void onslaught_updatelinks() { if (l.isshielded) { - ons_debug(strcat(etos(l), " (generator) is shielded\n")); + LOG_DEBUG(strcat(etos(l), " (generator) is shielded\n")); l.takedamage = DAMAGE_NO; l.bot_attack = false; } else { - ons_debug(strcat(etos(l), " (generator) is not shielded\n")); + LOG_DEBUG(strcat(etos(l), " (generator) is not shielded\n")); l.takedamage = DAMAGE_AIM; l.bot_attack = true; } @@ -350,7 +340,7 @@ void onslaught_updatelinks() { if (l.isshielded) { - ons_debug(strcat(etos(l), " (point) is shielded\n")); + LOG_DEBUG(strcat(etos(l), " (point) is shielded\n")); if (l.goalentity) { l.goalentity.takedamage = DAMAGE_NO; @@ -359,7 +349,7 @@ void onslaught_updatelinks() } else { - ons_debug(strcat(etos(l), " (point) is not shielded\n")); + LOG_DEBUG(strcat(etos(l), " (point) is not shielded\n")); if (l.goalentity) { l.goalentity.takedamage = DAMAGE_AIM; @@ -431,7 +421,7 @@ void ons_DelayedLinkSetup() if(!self.goalentity) { objerror("can not find target\n"); } if(!self.enemy) { objerror("can not find target2\n"); } - ons_debug(strcat(etos(self.goalentity), " linked with ", etos(self.enemy), "\n")); + LOG_DEBUG(strcat(etos(self.goalentity), " linked with ", etos(self.enemy), "\n")); self.SendFlags |= 3; self.think = ons_Link_CheckUpdate; self.nextthink = time; @@ -1340,8 +1330,8 @@ void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float s if(!needweapons && !needarmor) return; - ons_debug(strcat(self.netname, " needs weapons ", ftos(needweapons) , "\n")); - ons_debug(strcat(self.netname, " needs armor ", ftos(needarmor) , "\n")); + LOG_DEBUG(strcat(self.netname, " needs weapons ", ftos(needweapons) , "\n")); + LOG_DEBUG(strcat(self.netname, " needs armor ", ftos(needarmor) , "\n")); // See what is around head = findchainfloat(bot_pickup, true); @@ -1362,29 +1352,29 @@ void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float s void havocbot_role_ons_setrole(entity bot, int role) { - ons_debug(strcat(bot.netname," switched to ")); + LOG_DEBUG(strcat(bot.netname," switched to ")); switch(role) { case HAVOCBOT_ONS_ROLE_DEFENSE: - ons_debug("defense"); + LOG_DEBUG("defense"); bot.havocbot_role = havocbot_role_ons_defense; bot.havocbot_role_flags = HAVOCBOT_ONS_ROLE_DEFENSE; bot.havocbot_role_timeout = 0; break; case HAVOCBOT_ONS_ROLE_ASSISTANT: - ons_debug("assistant"); + LOG_DEBUG("assistant"); bot.havocbot_role = havocbot_role_ons_assistant; bot.havocbot_role_flags = HAVOCBOT_ONS_ROLE_ASSISTANT; bot.havocbot_role_timeout = 0; break; case HAVOCBOT_ONS_ROLE_OFFENSE: - ons_debug("offense"); + LOG_DEBUG("offense"); bot.havocbot_role = havocbot_role_ons_offense; bot.havocbot_role_flags = HAVOCBOT_ONS_ROLE_OFFENSE; bot.havocbot_role_timeout = 0; break; } - ons_debug("\n"); + LOG_DEBUG("\n"); } void havocbot_goalrating_ons_controlpoints_attack(float ratingscale) @@ -1440,7 +1430,7 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale) if (!cp) return; - ons_debug(strcat(self.netname, " chose cp ranked ", ftos(bestvalue), "\n")); + LOG_DEBUG(strcat(self.netname, " chose cp ranked ", ftos(bestvalue), "\n")); if(cp.goalentity) { @@ -1481,12 +1471,12 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale) { navigation_routerating(cp, ratingscale, 10000); } - ons_debug(strcat(self.netname, " found an attackable controlpoint at ", vtos(cp.origin) ,"\n")); + LOG_DEBUG(strcat(self.netname, " found an attackable controlpoint at ", vtos(cp.origin) ,"\n")); } else { // Should be touched - ons_debug(strcat(self.netname, " found a touchable controlpoint at ", vtos(cp.origin) ,"\n")); + LOG_DEBUG(strcat(self.netname, " found a touchable controlpoint at ", vtos(cp.origin) ,"\n")); found = false; // Look for auto generated waypoint @@ -1539,7 +1529,7 @@ bool havocbot_goalrating_ons_generator_attack(float ratingscale) if(bestwp) { - ons_debug("waypoints found around generator\n"); + LOG_DEBUG("waypoints found around generator\n"); navigation_routerating(bestwp, ratingscale, 10000); bestwp.cnt += 1; @@ -1552,7 +1542,7 @@ bool havocbot_goalrating_ons_generator_attack(float ratingscale) } else { - ons_debug("generator found without waypoints around\n"); + LOG_DEBUG("generator found without waypoints around\n"); // if there aren't waypoints near the generator go straight to it navigation_routerating(g, ratingscale, 10000); self.havocbot_attack_time = 0;