From 3846c9bd40c2b3c1aa220c1eeef9198b1912aab4 Mon Sep 17 00:00:00 2001 From: Jakob MG Date: Mon, 10 Oct 2011 16:42:18 +0200 Subject: [PATCH] get rid of 'local' prefixes (does nothing) --- qcsrc/client/Main.qc | 8 +- qcsrc/client/View.qc | 6 +- qcsrc/client/ctf.qc | 18 ++--- qcsrc/client/hud.qc | 4 +- qcsrc/common/util.qc | 8 +- qcsrc/menu/item/gecko.c | 2 +- qcsrc/server/assault.qc | 4 +- qcsrc/server/bot/aim.qc | 14 ++-- qcsrc/server/bot/bot.qc | 22 +++--- qcsrc/server/bot/havocbot/havocbot.qc | 86 ++++++++++----------- qcsrc/server/bot/havocbot/role_ctf.qc | 46 +++++------ qcsrc/server/bot/havocbot/role_freezetag.qc | 4 +- qcsrc/server/bot/havocbot/role_keepaway.qc | 4 +- qcsrc/server/bot/havocbot/role_keyhunt.qc | 4 +- qcsrc/server/bot/havocbot/role_onslaught.qc | 16 ++-- qcsrc/server/bot/havocbot/roles.qc | 12 +-- qcsrc/server/bot/navigation.qc | 72 ++++++++--------- qcsrc/server/bot/scripting.qc | 44 +++++------ qcsrc/server/bot/waypoints.qc | 60 +++++++------- qcsrc/server/campaign.qc | 2 +- qcsrc/server/cl_client.qc | 26 +++---- qcsrc/server/cl_impulse.qc | 2 +- qcsrc/server/cl_physics.qc | 6 +- qcsrc/server/cl_player.qc | 8 +- qcsrc/server/cl_weapons.qc | 4 +- qcsrc/server/cl_weaponsystem.qc | 12 +-- qcsrc/server/clientcommands.qc | 12 +-- qcsrc/server/ctf.qc | 14 ++-- qcsrc/server/domination.qc | 16 ++-- qcsrc/server/ent_cs.qc | 2 +- qcsrc/server/extensions.qh | 26 +++---- qcsrc/server/func_breakable.qc | 2 +- qcsrc/server/g_damage.qc | 16 ++-- qcsrc/server/g_hook.qc | 4 +- qcsrc/server/g_lights.qc | 6 +- qcsrc/server/g_subs.qc | 4 +- qcsrc/server/g_tetris.qc | 4 +- qcsrc/server/g_triggers.qc | 2 +- qcsrc/server/g_world.qc | 18 ++--- qcsrc/server/gamecommand.qc | 4 +- qcsrc/server/miscfunctions.qc | 6 +- qcsrc/server/mode_onslaught.qc | 24 +++--- qcsrc/server/monsters/ai.qc | 32 ++++---- qcsrc/server/monsters/fight.qc | 18 ++--- qcsrc/server/monsters/m_monsters.qc | 4 +- qcsrc/server/nexball.qc | 16 ++-- qcsrc/server/t_items.qc | 2 +- qcsrc/server/t_jumppads.qc | 14 ++-- qcsrc/server/t_plats.qc | 40 +++++----- qcsrc/server/teamplay.qc | 6 +- qcsrc/server/tturrets/system/system_misc.qc | 4 +- qcsrc/server/tturrets/units/unit_flac.qc | 2 +- qcsrc/server/tturrets/units/unit_hk.qc | 4 +- qcsrc/server/vote.qc | 32 ++++---- qcsrc/server/w_common.qc | 6 +- qcsrc/server/w_crylink.qc | 10 +-- qcsrc/server/w_electro.qc | 6 +- qcsrc/server/w_fireball.qc | 4 +- qcsrc/server/w_grenadelauncher.qc | 4 +- qcsrc/server/w_hagar.qc | 14 ++-- qcsrc/server/w_hlac.qc | 4 +- qcsrc/server/w_hook.qc | 2 +- qcsrc/server/w_laser.qc | 6 +- qcsrc/server/w_porto.qc | 2 +- qcsrc/server/w_rocketlauncher.qc | 14 ++-- qcsrc/server/w_seeker.qc | 6 +- qcsrc/server/w_shotgun.qc | 2 +- 67 files changed, 454 insertions(+), 454 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 606bbc92b..5bd490424 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -358,7 +358,7 @@ float CSQC_ConsoleCommand(string strMessage) argc = tokenize_console(strMessage); // Acquire Command - local string strCmd; + string strCmd; strCmd = argv(0); if(strCmd == "hud_configure") { // config hud @@ -636,7 +636,7 @@ void GameCommand(string msg) // 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)) @@ -1331,10 +1331,10 @@ void Net_WeaponComplain() { // 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... diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index ade5155c4..d01a7f552 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -1065,7 +1065,7 @@ void CSQC_UpdateView(float w, float h) wcross_color = stov(cvar_string(strcat("crosshair_", wcross_wep, "_color"))); else if(autocvar_crosshair_color_by_health) { - local float x = getstati(STAT_HEALTH); + float x = getstati(STAT_HEALTH); //x = red //y = green @@ -1512,8 +1512,8 @@ void CSQC_Demo_Camera() if(autocvar_camera_look_player) { - local vector dir; - local float n; + vector dir; + float n; dir = normalize(view_origin - current_position); n = mouse_angles_z; diff --git a/qcsrc/client/ctf.qc b/qcsrc/client/ctf.qc index fd35613a5..b940754be 100644 --- a/qcsrc/client/ctf.qc +++ b/qcsrc/client/ctf.qc @@ -23,9 +23,9 @@ void() menu_close = void() order_menu_render = { - local vector ps, po; - local float i, p, n; - local string frags, color; + vector ps, po; + float i, p, n; + string frags, color; ps = '0 200 0'; po = '0 8 0'; @@ -60,9 +60,9 @@ void() order_menu_render = float(float bInputType, float nPrimary, float nSecondary) order_menu_action = { - local string arg; - local float p, i, n, chose; - local string frags, color; + string arg; + float p, i, n, chose; + string frags, color; if(bInputType != 0) // key down wanted return FALSE; @@ -146,7 +146,7 @@ void() order_menu_show = void() ctf_menu_render = { - local vector ps, po; + vector ps, po; ps = '0 200 0'; po = '0 8 0'; @@ -166,7 +166,7 @@ void() ctf_menu_render = float(float bInputType, float nPrimary, float nSecondary) ctf_menu_action = { - local string arg; + string arg; if(bInputType != 0) // key down wanted return FALSE; @@ -202,7 +202,7 @@ void() ctf_menu_show = void() ctf_view = { - local float stat; + float stat; stat = getstati(STAT_CTF_STATE); if(stat == CTF_STATE_ATTACK) { drawpic('0 0 0', "gfx/ctf_ic_atk.tga", '64 64 0', '1 1 1', 1, 0); diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index fb47d9598..04060dbd0 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2358,8 +2358,8 @@ void HUD_Radar(void) mySize -= '2 2 0' * panel_bg_padding; } - local float color2; - local entity tm; + float color2; + entity tm; float scale2d, normalsize, bigsize; float f; diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index eb1ef20bf..d02fa1e2c 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -41,8 +41,8 @@ void wordwrap_sprint(string s, float l) string unescape(string in) { - local float i, len; - local string str, s; + float i, len; + string str, s; // but it doesn't seem to be necessary in my tests at least in = strzone(in); @@ -72,8 +72,8 @@ string unescape(string in) void wordwrap_cb(string s, float l, void(string) callback) { - local string c; - local float lleft, i, j, wlen; + string c; + float lleft, i, j, wlen; s = strzone(s); lleft = l; diff --git a/qcsrc/menu/item/gecko.c b/qcsrc/menu/item/gecko.c index dd752e6e5..a47e5d6b4 100644 --- a/qcsrc/menu/item/gecko.c +++ b/qcsrc/menu/item/gecko.c @@ -43,7 +43,7 @@ void Gecko_draw(entity me) draw_Picture( '0 0 0', strcat( "/", me.texturePath ), drawSize, '1 1 1', 1.0 ); } else { - local vector fontsize; + vector fontsize; fontsize_x = fontsize_y = 1.0 / 30.0; fontsize_z = 0.0; draw_Text( '0 0 0', _("Browser not initialized!"), fontsize, '1 1 1', 1.0, 0 ); diff --git a/qcsrc/server/assault.qc b/qcsrc/server/assault.qc index 517da8168..45fa5c77d 100644 --- a/qcsrc/server/assault.qc +++ b/qcsrc/server/assault.qc @@ -115,7 +115,7 @@ void assault_objective_decrease_use() { void assault_setenemytoobjective() { - local entity objective; + entity objective; for(objective = world; (objective = find(objective, targetname, self.target)); ) { if(objective.classname == "target_objective") { if(self.enemy == world) @@ -350,7 +350,7 @@ void assault_new_round() } - local entity ent; + entity ent; for(ent = world; (ent = nextent(ent)); ) { if(clienttype(ent) == CLIENTTYPE_NOTACLIENT) diff --git a/qcsrc/server/bot/aim.qc b/qcsrc/server/bot/aim.qc index b678bf1b6..8a728437a 100644 --- a/qcsrc/server/bot/aim.qc +++ b/qcsrc/server/bot/aim.qc @@ -6,8 +6,8 @@ entity ka_ball; float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, float shotspeed, float shotspeedupward, float maxtime, float shotdelay, entity ignore) { - local float c, savesolid, shottime; - local vector dir, end, v, o; + float c, savesolid, shottime; + vector dir, end, v, o; if (shotspeed < 1) return FALSE; // could cause division by zero if calculated if (targ.solid < SOLID_BBOX) // SOLID_NOT and SOLID_TRIGGER @@ -169,8 +169,8 @@ void bot_lagfunc(float t, float f1, float f2, entity e1, vector v1, vector v2, v float bot_aimdir(vector v, float maxfiredeviation) { - local float dist, delta_t, blend; - local vector desiredang, diffang; + float dist, delta_t, blend; + vector desiredang, diffang; //dprint("aim ", self.netname, ": old:", vtos(self.v_angle)); // make sure v_angle is sane first @@ -271,7 +271,7 @@ float bot_aimdir(vector v, float maxfiredeviation) //diffang = diffang + randomvec() * (dist * 0.05 * (3.5 - bound(0, skill, 3))); // turn - local float r, fixedrate, blendrate; + float r, fixedrate, blendrate; fixedrate = autocvar_bot_ai_aimskill_fixedrate / bound(1,dist,1000); blendrate = autocvar_bot_ai_aimskill_blendrate; r = max(fixedrate, blendrate); @@ -320,8 +320,8 @@ vector bot_shotlead(vector targorigin, vector targvelocity, float shotspeed, flo float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float applygravity) { - local float f, r, hf, distanceratio; - local vector v; + float f, r, hf, distanceratio; + vector v; /* eprint(self); dprint("bot_aim(", ftos(shotspeed)); diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 351625bb5..8368a0df9 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -12,7 +12,7 @@ entity bot_spawn() { - local entity oldself, bot; + entity oldself, bot; bot = spawnclient(); if (bot) { @@ -239,7 +239,7 @@ void bot_setnameandstuff() void bot_custom_weapon_priority_setup() { - local float tokens, i, c, w; + float tokens, i, c, w; bot_custom_weapon = FALSE; @@ -316,7 +316,7 @@ void bot_custom_weapon_priority_setup() void bot_endgame() { - local entity e; + entity e; //dprint("bot_endgame\n"); e = bot_list; while (e) @@ -329,8 +329,8 @@ void bot_endgame() void bot_relinkplayerlist() { - local entity e; - local entity prevbot; + entity e; + entity prevbot; player_count = 0; currentbots = 0; player_list = e = findchainflags(flags, FL_CLIENT); @@ -409,8 +409,8 @@ void bot_clientconnect() void bot_removefromlargestteam() { - local float besttime, bestcount, thiscount; - local entity best, head; + float besttime, bestcount, thiscount; + entity best, head; CheckAllowedTeams(world); GetTeamCounts(world); head = findchainfloat(isbot, TRUE); @@ -450,8 +450,8 @@ void bot_removefromlargestteam() void bot_removenewest() { - local float besttime; - local entity best, head; + float besttime; + entity best, head; if(teamplay) { @@ -633,7 +633,7 @@ void bot_serverframe() else { // TODO: Make this check cleaner - local entity wp = findchain(classname, "waypoint"); + entity wp = findchain(classname, "waypoint"); if(time - wp.nextthink > 10) waypoint_save_links(); } @@ -662,7 +662,7 @@ void bot_serverframe() if (botframe_nextdangertime < time) { - local float interval; + float interval; interval = autocvar_bot_ai_dangerdetectioninterval; if (botframe_nextdangertime < time - interval * 1.5) botframe_nextdangertime = time; diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index ad9f3d185..b4cb4aa08 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -35,8 +35,8 @@ void havocbot_ai() if(self.waterlevel==WATERLEVEL_SWIMMING || self.aistatus & AI_STATUS_OUT_WATER) { // Look for the closest waypoint out of water - local entity newgoal, head; - local float bestdistance, distance; + entity newgoal, head; + float bestdistance, distance; newgoal = world; bestdistance = 10000; @@ -119,8 +119,8 @@ void havocbot_ai() self.aistatus |= AI_STATUS_ROAMING; self.aistatus &~= AI_STATUS_ATTACKING; - local vector now,v,next;//,heading; - local float aimdistance,skillblend,distanceblend,blend; + vector now,v,next;//,heading; + float aimdistance,skillblend,distanceblend,blend; next = now = ( (self.goalcurrent.absmin + self.goalcurrent.absmax) * 0.5) - (self.origin + self.view_ofs); aimdistance = vlen(now); //heading = self.velocity; @@ -177,8 +177,8 @@ void havocbot_ai() void havocbot_keyboard_movement(vector destorg) { - local vector keyboard; - local float blend, maxspeed; + vector keyboard; + float blend, maxspeed; float sk; sk = skill + self.bot_moveskill; @@ -196,7 +196,7 @@ void havocbot_keyboard_movement(vector destorg) , time); keyboard = self.movement * (1.0 / maxspeed); - local float trigger, trigger1; + float trigger, trigger1; blend = bound(0,sk*0.1,1); trigger = autocvar_bot_ai_keyboard_threshold; trigger1 = 0 - trigger; @@ -252,9 +252,9 @@ void havocbot_keyboard_movement(vector destorg) void havocbot_bunnyhop(vector dir) { - local float bunnyhopdistance; - local vector deviation; - local float maxspeed; + float bunnyhopdistance; + vector deviation; + float maxspeed; vector gco, gno; if(autocvar_g_midair) @@ -306,7 +306,7 @@ void havocbot_bunnyhop(vector dir) // for a period of time if(time - self.bot_timelastseengoal > autocvar_bot_ai_bunnyhop_firstjumpdelay) { - local float checkdistance; + float checkdistance; checkdistance = TRUE; // don't run if it is too close @@ -398,19 +398,19 @@ void havocbot_bunnyhop(vector dir) void havocbot_movetogoal() { - local vector destorg; - local vector diff; - local vector dir; - local vector flatdir; - local vector m1; - local vector m2; - local vector evadeobstacle; - local vector evadelava; - local float s; - local float maxspeed; - local vector gco; - //local float dist; - local vector dodge; + vector destorg; + vector diff; + vector dir; + vector flatdir; + vector m1; + vector m2; + vector evadeobstacle; + vector evadelava; + float s; + float maxspeed; + vector gco; + //float dist; + vector dodge; //if (self.goalentity) // te_lightning2(self, self.origin, (self.goalentity.absmin + self.goalentity.absmax) * 0.5); self.movement = '0 0 0'; @@ -493,8 +493,8 @@ void havocbot_movetogoal() { if(fabs(self.velocity_z)<50) { - local entity head, newgoal; - local float distance, bestdistance; + entity head, newgoal; + float distance, bestdistance; for (head = findchain(classname, "waypoint"); head; head = head.chain) { @@ -577,8 +577,8 @@ void havocbot_movetogoal() else dir = normalize(( ( self.goalcurrent.absmin + self.goalcurrent.absmax ) * 0.5 ) - self.origin); - local vector xyvelocity = self.velocity; xyvelocity_z = 0; - local float xyspeed = xyvelocity * dir; + vector xyvelocity = self.velocity; xyvelocity_z = 0; + float xyspeed = xyvelocity * dir; if(xyspeed < (maxspeed / 2)) { @@ -726,7 +726,7 @@ void havocbot_movetogoal() } // avoiding dangers and obstacles - local vector dst_ahead, dst_down; + vector dst_ahead, dst_down; makevectors(self.v_angle_y * '0 1 0'); dst_ahead = self.origin + self.view_ofs + (self.velocity * 0.4) + (v_forward * 32 * 3); dst_down = dst_ahead + '0 0 -1500'; @@ -855,9 +855,9 @@ void havocbot_movetogoal() void havocbot_chooseenemy() { - local entity head, best, head2; - local float rating, bestrating, i, hf; - local vector eye, v; + entity head, best, head2; + float rating, bestrating, i, hf; + vector eye, v; if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(self)) { self.enemy = world; @@ -960,7 +960,7 @@ float havocbot_chooseweapon_checkreload(float new_weapon) // if this weapon is scheduled for reloading, don't switch to it during combat if (self.weapon_load[new_weapon] < 0) { - local float i, other_weapon_available; + float i, other_weapon_available; for(i = WEP_FIRST; i <= WEP_LAST; ++i) { // if we are out of ammo for all other weapons, it's an emergency to switch to anything else @@ -976,7 +976,7 @@ float havocbot_chooseweapon_checkreload(float new_weapon) void havocbot_chooseweapon() { - local float i; + float i; // ;) if(g_weaponarena == WEPBIT_TUBA) @@ -1006,11 +1006,11 @@ void havocbot_chooseweapon() if(i < 1) return; - local float w; - local float distance; distance=bound(10,vlen(self.origin-self.enemy.origin)-200,10000); + float w; + float distance; distance=bound(10,vlen(self.origin-self.enemy.origin)-200,10000); // Should it do a weapon combo? - local float af, ct, combo_time, combo; + float af, ct, combo_time, combo; af = ATTACK_FINISHED(self); ct = autocvar_bot_ai_weapon_combo_threshold; @@ -1078,7 +1078,7 @@ void havocbot_chooseweapon() void havocbot_aim() { - local vector selfvel, enemyvel; + vector selfvel, enemyvel; // if(self.flags & FL_INWATER) // return; if (time < self.nextaim) @@ -1111,7 +1111,7 @@ float havocbot_moveto_refresh_route() float havocbot_moveto(vector pos) { - local entity wp; + entity wp; if(self.aistatus & AI_STATUS_WAYPOINT_PERSONAL_GOING) { @@ -1153,7 +1153,7 @@ float havocbot_moveto(vector pos) debuggoalstack(); // Heading - local vector dir = ( ( self.goalcurrent.absmin + self.goalcurrent.absmax ) * 0.5 ) - (self.origin + self.view_ofs); + vector dir = ( ( self.goalcurrent.absmin + self.goalcurrent.absmax ) * 0.5 ) - (self.origin + self.view_ofs); dir_z = 0; bot_aimdir(dir, -1); @@ -1245,9 +1245,9 @@ vector havocbot_dodge() // LordHavoc: disabled because this is too expensive return '0 0 0'; #if 0 - local entity head; - local vector dodge, v, n; - local float danger, bestdanger, vl, d; + entity head; + vector dodge, v, n; + float danger, bestdanger, vl, d; dodge = '0 0 0'; bestdanger = -20; // check for dangerous objects near bot or approaching bot diff --git a/qcsrc/server/bot/havocbot/role_ctf.qc b/qcsrc/server/bot/havocbot/role_ctf.qc index f85f2ef64..8e413bbfe 100644 --- a/qcsrc/server/bot/havocbot/role_ctf.qc +++ b/qcsrc/server/bot/havocbot/role_ctf.qc @@ -77,7 +77,7 @@ float havocbot_ctf_teamcount(entity bot, vector org, float radius) void havocbot_goalrating_ctf_ourflag(float ratingscale) { - local entity head; + entity head; head = ctf_worldflaglist; while (head) { @@ -91,7 +91,7 @@ void havocbot_goalrating_ctf_ourflag(float ratingscale) void havocbot_goalrating_ctf_ourbase(float ratingscale) { - local entity head; + entity head; head = ctf_worldflaglist; while (head) { @@ -107,7 +107,7 @@ void havocbot_goalrating_ctf_ourbase(float ratingscale) void havocbot_goalrating_ctf_enemyflag(float ratingscale) { - local entity head; + entity head; head = ctf_worldflaglist; while (head) { @@ -127,7 +127,7 @@ void havocbot_goalrating_ctf_enemybase(float ratingscale) return; } - local entity head; + entity head; head = havocbot_ctf_find_enemy_flag(self); @@ -139,7 +139,7 @@ void havocbot_goalrating_ctf_enemybase(float ratingscale) void havocbot_goalrating_ctf_ourstolenflag(float ratingscale) { - local entity mf; + entity mf; mf = havocbot_ctf_find_flag(self); @@ -152,7 +152,7 @@ void havocbot_goalrating_ctf_ourstolenflag(float ratingscale) void havocbot_goalrating_ctf_droppedflags(float ratingscale, vector org, float radius) { - local entity head; + entity head; head = ctf_worldflaglist; while (head) { @@ -175,8 +175,8 @@ void havocbot_goalrating_ctf_droppedflags(float ratingscale, vector org, float r void havocbot_goalrating_ctf_carrieritems(float ratingscale, vector org, float sradius) { - local entity head; - local float t; + entity head; + float t; head = findchainfloat(bot_pickup, TRUE); while (head) { @@ -279,7 +279,7 @@ void havocbot_role_ctf_carrier() void havocbot_role_ctf_escort() { - local entity mf, ef; + entity mf, ef; if(self.deadflag != DEAD_NO) { @@ -339,8 +339,8 @@ void havocbot_role_ctf_escort() void havocbot_role_ctf_offense() { - local entity mf, ef; - local vector pos; + entity mf, ef; + vector pos; if(self.deadflag != DEAD_NO) { @@ -421,7 +421,7 @@ void havocbot_role_ctf_offense() // Retriever (temporary role): void havocbot_role_ctf_retriever() { - local entity mf; + entity mf; if(self.deadflag != DEAD_NO) { @@ -454,7 +454,7 @@ void havocbot_role_ctf_retriever() if (self.bot_strategytime < time) { - local float radius; + float radius; radius = 10000; self.bot_strategytime = time + autocvar_bot_ai_strategyinterval; @@ -469,7 +469,7 @@ void havocbot_role_ctf_retriever() void havocbot_role_ctf_middle() { - local entity mf; + entity mf; if(self.deadflag != DEAD_NO) { @@ -501,7 +501,7 @@ void havocbot_role_ctf_middle() if (self.bot_strategytime < time) { - local vector org; + vector org; org = havocbot_ctf_middlepoint; org_z = self.origin_z; @@ -520,7 +520,7 @@ void havocbot_role_ctf_middle() void havocbot_role_ctf_defense() { - local entity mf; + entity mf; if(self.deadflag != DEAD_NO) { @@ -552,8 +552,8 @@ void havocbot_role_ctf_defense() } if (self.bot_strategytime < time) { - local float radius; - local vector org; + float radius; + vector org; org = mf.dropped_origin; radius = havocbot_ctf_middlepoint_radius; @@ -562,8 +562,8 @@ void havocbot_role_ctf_defense() navigation_goalrating_start(); // if enemies are closer to our base, go there - local entity head, closestplayer; - local float distance, bestdistance; + entity head, closestplayer; + float distance, bestdistance; distance = 10000; FOR_EACH_PLAYER(head) { @@ -614,9 +614,9 @@ void havocbot_calculate_middlepoint() void havocbot_ctf_reset_role(entity bot) { - local float cdefense, cmiddle, coffense; - local entity mf, ef, head; - local float c; + float cdefense, cmiddle, coffense; + entity mf, ef, head; + float c; if(bot.deadflag != DEAD_NO) return; diff --git a/qcsrc/server/bot/havocbot/role_freezetag.qc b/qcsrc/server/bot/havocbot/role_freezetag.qc index c81d7d0f3..626792f2e 100644 --- a/qcsrc/server/bot/havocbot/role_freezetag.qc +++ b/qcsrc/server/bot/havocbot/role_freezetag.qc @@ -3,7 +3,7 @@ void() havocbot_role_ft_offense; void havocbot_goalrating_freeplayers(float ratingscale, vector org, float sradius) { - local entity head; + entity head; float distance; FOR_EACH_PLAYER(head) @@ -29,7 +29,7 @@ void havocbot_goalrating_freeplayers(float ratingscale, vector org, float sradiu void havocbot_role_ft_offense() { - local entity head; + entity head; float unfrozen; if(self.deadflag != DEAD_NO) diff --git a/qcsrc/server/bot/havocbot/role_keepaway.qc b/qcsrc/server/bot/havocbot/role_keepaway.qc index 8ea23f1af..15e10f683 100644 --- a/qcsrc/server/bot/havocbot/role_keepaway.qc +++ b/qcsrc/server/bot/havocbot/role_keepaway.qc @@ -9,8 +9,8 @@ entity ka_ball; void havocbot_goalrating_ball(float ratingscale, vector org) { - local float t; - local entity ball_owner; + float t; + entity ball_owner; ball_owner = ka_ball.owner; if (ball_owner == self) diff --git a/qcsrc/server/bot/havocbot/role_keyhunt.qc b/qcsrc/server/bot/havocbot/role_keyhunt.qc index 8e30b37b5..811d66dc5 100644 --- a/qcsrc/server/bot/havocbot/role_keyhunt.qc +++ b/qcsrc/server/bot/havocbot/role_keyhunt.qc @@ -8,7 +8,7 @@ entity kh_worldkeylist; void havocbot_goalrating_kh(float ratingscale_team, float ratingscale_dropped, float ratingscale_enemy) { - local entity head; + entity head; for (head = kh_worldkeylist; head; head = head.kh_worldkeynext) { if(head.owner == self) @@ -197,7 +197,7 @@ void havocbot_role_kh_freelancer() void havocbot_chooserole_kh() { - local float r; + float r; if(self.deadflag != DEAD_NO) return; diff --git a/qcsrc/server/bot/havocbot/role_onslaught.qc b/qcsrc/server/bot/havocbot/role_onslaught.qc index bc8434028..61b6e205c 100644 --- a/qcsrc/server/bot/havocbot/role_onslaught.qc +++ b/qcsrc/server/bot/havocbot/role_onslaught.qc @@ -27,8 +27,8 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float sradius) { - local entity head; - local float t, i, c, needarmor, needweapons; + entity head; + float t, i, c, needarmor, needweapons; // Needs armor/health? if(self.health<100) @@ -98,8 +98,8 @@ void havocbot_role_ons_setrole(entity bot, float role) float havocbot_ons_teamcount(entity bot, float role) { - local float c; - local entity head; + float c; + entity head; FOR_EACH_PLAYER(head) if(head.team==self.team) @@ -235,8 +235,8 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale) float havocbot_goalrating_ons_generator_attack(float ratingscale) { - local entity g, wp, bestwp; - local float found, best; + entity g, wp, bestwp; + float found, best; for (g = findchain(classname, "onslaught_generator"); g; g = g.chain) { @@ -335,8 +335,8 @@ void havocbot_role_ons_defense() void havocbot_ons_reset_role(entity bot) { - local entity head; - local float c; + entity head; + float c; if(self.deadflag != DEAD_NO) return; diff --git a/qcsrc/server/bot/havocbot/roles.qc b/qcsrc/server/bot/havocbot/roles.qc index 93a683a93..4947c987e 100644 --- a/qcsrc/server/bot/havocbot/roles.qc +++ b/qcsrc/server/bot/havocbot/roles.qc @@ -7,9 +7,9 @@ void havocbot_goalrating_items(float ratingscale, vector org, float sradius) { - local entity head; - local entity player; - local float rating, d, discard, distance, friend_distance, enemy_distance; + entity head; + entity player; + float rating, d, discard, distance, friend_distance, enemy_distance; vector o; ratingscale = ratingscale * 0.0001; // items are rated around 10000 already head = findchainfloat(bot_pickup, TRUE); @@ -129,7 +129,7 @@ void havocbot_goalrating_items(float ratingscale, vector org, float sradius) void havocbot_goalrating_controlpoints(float ratingscale, vector org, float sradius) { - local entity head; + entity head; head = findchain(classname, "dom_controlpoint"); while (head) { @@ -148,8 +148,8 @@ void havocbot_goalrating_controlpoints(float ratingscale, vector org, float srad void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius) { - local entity head; - local float t, noteam, distance; + entity head; + float t, noteam, distance; noteam = ((self.team == 0) || !teamplay); // fteqcc sucks if (autocvar_bot_nofire) diff --git a/qcsrc/server/bot/navigation.qc b/qcsrc/server/bot/navigation.qc index 636c0d58a..b13f183c7 100644 --- a/qcsrc/server/bot/navigation.qc +++ b/qcsrc/server/bot/navigation.qc @@ -4,15 +4,15 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float movemode) { - local vector org; - local vector move; - local vector dir; - local float dist; - local float totaldist; - local float stepdist; - local float yaw; - local float ignorehazards; - local float swimming; + vector org; + vector move; + vector dir; + float dist; + float totaldist; + float stepdist; + float yaw; + float ignorehazards; + float swimming; if(autocvar_bot_debug_tracewalk) { @@ -147,7 +147,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float traceline( org, move, movemode, e); if ( trace_ent.classname == "door_rotating" || trace_ent.classname == "door") { - local vector nextmove; + vector nextmove; move = trace_endpos; while(trace_ent.classname == "door_rotating" || trace_ent.classname == "door") { @@ -185,7 +185,7 @@ float tracewalk(entity e, vector start, vector m1, vector m2, vector end, float // moved successfully if(swimming) { - local float c; + float c; c = pointcontents(org + '0 0 1'); if not(c == CONTENT_WATER || c == CONTENT_LAVA || c == CONTENT_SLIME) swimming = FALSE; @@ -335,9 +335,9 @@ void navigation_poproute() // find the spawnfunc_waypoint near a dynamic goal such as a dropped weapon entity navigation_findnearestwaypoint(entity ent, float walkfromwp) { - local entity waylist, w, best; - local float dist, bestdist; - local vector v, org, pm1, pm2; + entity waylist, w, best; + float dist, bestdist; + vector v, org, pm1, pm2; pm1 = ent.origin + ent.mins; pm2 = ent.origin + ent.maxs; waylist = findchain(classname, "waypoint"); @@ -373,7 +373,7 @@ entity navigation_findnearestwaypoint(entity ent, float walkfromwp) { if (w.wpisbox) { - local vector wm1, wm2; + vector wm1, wm2; wm1 = w.origin + w.mins; wm2 = w.origin + w.maxs; v_x = bound(wm1_x, org_x, wm2_x); @@ -416,9 +416,9 @@ entity navigation_findnearestwaypoint(entity ent, float walkfromwp) // finds the waypoints near the bot initiating a navigation query float navigation_markroutes_nearestwaypoints(entity waylist, float maxdist) { - local entity head; - local vector v, m1, m2, diff; - local float c; + entity head; + vector v, m1, m2, diff; + float c; // navigation_testtracewalk = TRUE; c = 0; head = waylist; @@ -461,9 +461,9 @@ float navigation_markroutes_nearestwaypoints(entity waylist, float maxdist) // updates a path link if a spawnfunc_waypoint link is better than the current one void navigation_markroutes_checkwaypoint(entity w, entity wp, float cost2, vector p) { - local vector m1; - local vector m2; - local vector v; + vector m1; + vector m2; + vector v; if (wp.wpisbox) { m1 = wp.absmin; @@ -487,9 +487,9 @@ void navigation_markroutes_checkwaypoint(entity w, entity wp, float cost2, vecto // queries the entire spawnfunc_waypoint network for pathes leading away from the bot void navigation_markroutes(entity fixed_source_waypoint) { - local entity w, wp, waylist; - local float searching, cost, cost2; - local vector p; + entity w, wp, waylist; + float searching, cost, cost2; + vector p; w = waylist = findchain(classname, "waypoint"); while (w) { @@ -513,7 +513,7 @@ void navigation_markroutes(entity fixed_source_waypoint) { // try a short range search for the nearest waypoints, and expand the search repeatedly if none are found // as this search is expensive we will use lower values if the bot is on the air - local float i, increment, maxdistance; + float i, increment, maxdistance; if(self.flags & FL_ONGROUND) { increment = 750; @@ -583,9 +583,9 @@ void navigation_markroutes(entity fixed_source_waypoint) // queries the entire spawnfunc_waypoint network for pathes leading to the bot void navigation_markroutes_inverted(entity fixed_source_waypoint) { - local entity w, wp, waylist; - local float searching, cost, cost2; - local vector p; + entity w, wp, waylist; + float searching, cost, cost2; + vector p; w = waylist = findchain(classname, "waypoint"); while (w) { @@ -684,8 +684,8 @@ void navigation_routerating(entity e, float f, float rangebias) // dprint("jetpack ai: can bridge these two points\n"); // Lower the altitude of these points as much as possible - local float zdistance, xydistance, cost, t, fuel; - local vector down, npa, npb; + float zdistance, xydistance, cost, t, fuel; + vector down, npa, npb; down = '0 0 -1' * (PL_MAX_z - PL_MIN_z) * 10; @@ -876,7 +876,7 @@ float navigation_routetogoal(entity e, vector startposition) // (this is how bots detect if they reached a goal) void navigation_poptouchedgoals() { - local vector org, m1, m2; + vector org, m1, m2; org = self.origin; m1 = org + self.mins; m2 = org + self.maxs; @@ -998,9 +998,9 @@ void navigation_goalrating_end() void botframe_updatedangerousobjects(float maxupdate) { - local entity head, bot_dodgelist; - local vector m1, m2, v, o; - local float c, d, danger; + entity head, bot_dodgelist; + vector m1, m2, v, o; + float c, d, danger; c = 0; bot_dodgelist = findchainfloat(bot_dodge, TRUE); botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "waypoint"); @@ -1176,8 +1176,8 @@ void debugnodestatus(vector position, float status) // Debug the goal stack visually void debuggoalstack() { - local entity goal; - local vector org, go; + entity goal; + vector org, go; if(self.goalcounter==0)goal=self.goalcurrent; else if(self.goalcounter==1)goal=self.goalstack01; diff --git a/qcsrc/server/bot/scripting.qc b/qcsrc/server/bot/scripting.qc index 63151cac1..6b1eba827 100644 --- a/qcsrc/server/bot/scripting.qc +++ b/qcsrc/server/bot/scripting.qc @@ -273,7 +273,7 @@ void bot_commands_init() // Returns first bot with matching name entity find_bot_by_name(string name) { - local entity bot; + entity bot; bot = findchainflags(flags, FL_CLIENT); while (bot) @@ -291,8 +291,8 @@ entity find_bot_by_name(string name) // Returns a bot by number on list entity find_bot_by_number(float number) { - local entity bot; - local float c; + entity bot; + float c; if(!number) return world; @@ -313,7 +313,7 @@ entity find_bot_by_number(float number) float bot_decodecommand(string cmdstring) { - local float cmd_parm_type, i; + float cmd_parm_type, i; float sp; string parm; @@ -372,8 +372,8 @@ float bot_decodecommand(string cmdstring) void bot_cmdhelp(string scmd) { - local float i, ntype; - local string stype; + float i, ntype; + string stype; if(!bot_cmds_initialized) bot_commands_init(); @@ -487,8 +487,8 @@ void bot_cmdhelp(string scmd) void bot_list_commands() { - local float i; - local string ptype; + float i; + string ptype; if(!bot_cmds_initialized) bot_commands_init(); @@ -625,7 +625,7 @@ float bot_cmd_turn() float bot_cmd_select_weapon() { - local float id; + float id; id = bot_cmd.bot_cmd_parm_float; @@ -679,8 +679,8 @@ float bot_cmd_eval(string expr) float bot_cmd_if() { - local string expr, val_a, val_b; - local float cmpofs; + string expr, val_a, val_b; + float cmpofs; if(self.bot_cmd_condition_status != CMD_CONDITION_NONE) { @@ -777,7 +777,7 @@ float bot_cmd_aim() // Current direction if(self.bot_cmd_aim_endtime) { - local float progress; + float progress; progress = min(1 - (self.bot_cmd_aim_endtime - time) / (self.bot_cmd_aim_endtime - self.bot_cmd_aim_begintime),1); self.v_angle = self.bot_cmd_aim_begin + ((self.bot_cmd_aim_end - self.bot_cmd_aim_begin) * progress); @@ -792,8 +792,8 @@ float bot_cmd_aim() } // New aiming direction - local string parms; - local float tokens, step; + string parms; + float tokens, step; parms = bot_cmd.bot_cmd_parm_string; @@ -830,10 +830,10 @@ float bot_cmd_aimtarget() return bot_cmd_aim(); } - local entity e; - local string parms; - local vector v; - local float tokens, step; + entity e; + string parms; + vector v; + float tokens, step; parms = bot_cmd.bot_cmd_parm_string; @@ -1027,7 +1027,7 @@ float bot_cmd_keypress_handler(string key, float enabled) float bot_cmd_presskey() { - local string key; + string key; key = bot_cmd.bot_cmd_parm_string; @@ -1038,7 +1038,7 @@ float bot_cmd_presskey() float bot_cmd_releasekey() { - local string key; + string key; key = bot_cmd.bot_cmd_parm_string; @@ -1213,7 +1213,7 @@ void bot_resetqueues() // NOTE: Of course you need to include your commands here too :) float bot_execute_commands_once() { - local float status, ispressingkey; + float status, ispressingkey; // Find command bot_setcurrentcommand(); @@ -1346,7 +1346,7 @@ float bot_execute_commands_once() { if(autocvar_g_debug_bot_commands) { - local string parms; + string parms; switch(bot_cmd_parm_type[bot_cmd.bot_cmd_type]) { diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index c48545e5a..84049a970 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -3,7 +3,7 @@ // (suitable for spawnfunc_waypoint editor) entity waypoint_spawn(vector m1, vector m2, float f) { - local entity w; + entity w; w = find(world, classname, "waypoint"); if not(f & WAYPOINTFLAG_PERSONAL) @@ -72,7 +72,7 @@ entity waypoint_spawn(vector m1, vector m2, float f) // add a new link to the spawnfunc_waypoint, replacing the furthest link it already has void waypoint_addlink(entity from, entity to) { - local float c; + float c; if (from == to) return; @@ -92,7 +92,7 @@ void waypoint_addlink(entity from, entity to) { // if either is a box we have to find the nearest points on them to // calculate the distance properly - local vector v1, v2, m1, m2; + vector v1, v2, m1, m2; v1 = from.origin; m1 = to.absmin; m2 = to.absmax; @@ -151,8 +151,8 @@ void waypoint_addlink(entity from, entity to) // (SLOW!) void waypoint_think() { - local entity e; - local vector sv, sm1, sm2, ev, em1, em2, dv; + entity e; + vector sv, sm1, sm2, ev, em1, em2, dv; bot_calculate_stepheightvec(); @@ -231,7 +231,7 @@ void waypoint_think() void waypoint_clearlinks(entity wp) { // clear links to other waypoints - local float f; + float f; f = 10000000; wp.wp00 = wp.wp01 = wp.wp02 = wp.wp03 = wp.wp04 = wp.wp05 = wp.wp06 = wp.wp07 = world; wp.wp08 = wp.wp09 = wp.wp10 = wp.wp11 = wp.wp12 = wp.wp13 = wp.wp14 = wp.wp15 = world; @@ -254,7 +254,7 @@ void waypoint_schedulerelink(entity wp) // TODO: add some sort of visible box in edit mode for box waypoints if (autocvar_g_waypointeditor) { - local vector m1, m2; + vector m1, m2; m1 = wp.mins; m2 = wp.maxs; setmodel(wp, "models/runematch/rune.mdl"); wp.effects = EF_LOWPRECISION; @@ -332,7 +332,7 @@ void waypoint_remove(entity e) // empties the map of waypoints void waypoint_removeall() { - local entity head, next; + entity head, next; head = findchain(classname, "waypoint"); while (head) { @@ -346,7 +346,7 @@ void waypoint_removeall() // (is this useful at all?) void waypoint_schedulerelinkall() { - local entity head; + entity head; relink_total = relink_walkculled = relink_pvsculled = relink_lengthculled = 0; head = findchain(classname, "waypoint"); while (head) @@ -359,10 +359,10 @@ void waypoint_schedulerelinkall() // Load waypoint links from file float waypoint_load_links() { - local string filename, s; - local float file, tokens, c, found; - local entity wp_from, wp_to; - local vector wp_to_pos, wp_from_pos; + string filename, s; + float file, tokens, c, found; + entity wp_from, wp_to; + vector wp_to_pos, wp_from_pos; filename = strcat("maps/", mapname); filename = strcat(filename, ".waypoints.cache"); file = fopen(filename, FILE_READ); @@ -455,10 +455,10 @@ float waypoint_load_links() void waypoint_load_links_hardwired() { - local string filename, s; - local float file, tokens, c, found; - local entity wp_from, wp_to; - local vector wp_to_pos, wp_from_pos; + string filename, s; + float file, tokens, c, found; + entity wp_from, wp_to; + vector wp_to_pos, wp_from_pos; filename = strcat("maps/", mapname); filename = strcat(filename, ".waypoints.hardwired"); file = fopen(filename, FILE_READ); @@ -554,9 +554,9 @@ void waypoint_load_links_hardwired() // Save all waypoint links to a file void waypoint_save_links() { - local string filename, s; - local float file, c, i; - local entity w, link; + string filename, s; + float file, c, i; + entity w, link; filename = strcat("maps/", mapname); filename = strcat(filename, ".waypoints.cache"); file = fopen(filename, FILE_WRITE); @@ -632,9 +632,9 @@ void waypoint_save_links() // save waypoints to gamedir/data/maps/mapname.waypoints void waypoint_saveall() { - local string filename, s; - local float file, c; - local entity w; + string filename, s; + float file, c; + entity w; filename = strcat("maps/", mapname); filename = strcat(filename, ".waypoints"); file = fopen(filename, FILE_WRITE); @@ -676,9 +676,9 @@ void waypoint_saveall() // load waypoints from file float waypoint_loadall() { - local string filename, s; - local float file, cwp, cwb, fl; - local vector m1, m2; + string filename, s; + float file, cwp, cwb, fl; + vector m1, m2; cwp = 0; cwb = 0; filename = strcat("maps/", mapname); @@ -736,7 +736,7 @@ vector waypoint_fixorigin(vector position) void waypoint_spawnforitem_force(entity e, vector org) { - local entity w; + entity w; // Fix the waypoint altitude if necessary org = waypoint_fixorigin(org); @@ -776,8 +776,8 @@ void waypoint_spawnforitem(entity e) void waypoint_spawnforteleporter_boxes(entity e, vector org1, vector org2, vector destination1, vector destination2, float timetaken) { - local entity w; - local entity dw; + entity w; + entity dw; w = waypoint_spawn(org1, org2, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK); dw = waypoint_spawn(destination1, destination2, WAYPOINTFLAG_GENERATED); // one way link to the destination @@ -823,7 +823,7 @@ entity waypoint_spawnpersonal(vector position) void botframe_showwaypointlinks() { - local entity player, head, w; + entity player, head, w; if (time < botframe_waypointeditorlightningtime) return; botframe_waypointeditorlightningtime = time + 0.5; diff --git a/qcsrc/server/campaign.qc b/qcsrc/server/campaign.qc index c64716d9e..5a68e9605 100644 --- a/qcsrc/server/campaign.qc +++ b/qcsrc/server/campaign.qc @@ -169,7 +169,7 @@ void CampaignPreIntermission() entity head; float won; float lost; - local string savevar; + string savevar; won = 0; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index c1667ce92..451ab3990 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -153,7 +153,7 @@ vector Spawn_Score(entity spot, entity playerlist, float teamcheck, float anypoi // filter out spots for assault if(spot.target != "") { - local entity ent; + entity ent; float good, found; ent = find(world, targetname, spot.target); @@ -224,7 +224,7 @@ float spawn_allbad; float spawn_allgood; entity Spawn_FilterOutBadSpots(entity firstspot, entity playerlist, float mindist, float teamcheck, float anypoint) { - local entity spot, spotlist, spotlistend; + entity spot, spotlist, spotlistend; spawn_allgood = TRUE; spawn_allbad = TRUE; @@ -299,7 +299,7 @@ entity Spawn_WeightedPoint(entity firstspot, float lower, float upper, float exp { // weight of a point: bound(lower, mindisttoplayer, upper)^exponent // multiplied by spot.cnt (useful if you distribute many spawnpoints in a small area) - local entity spot; + entity spot; RandomSelection_Init(); for(spot = firstspot; spot; spot = spot.chain) @@ -317,9 +317,9 @@ Finds a point to respawn */ entity SelectSpawnPoint (float anypoint) { - local float teamcheck; - local entity firstspot_new; - local entity spot, firstspot, playerlist; + float teamcheck; + entity firstspot_new; + entity spot, firstspot, playerlist; spot = find (world, classname, "testplayerstart"); if (spot) @@ -755,9 +755,9 @@ void PutObserverInServer (void) void FixPlayermodel() { - local string defaultmodel; - local float defaultskin, chmdl, oldskin; - local vector m1, m2; + string defaultmodel; + float defaultskin, chmdl, oldskin; + vector m1, m2; defaultmodel = ""; @@ -1939,7 +1939,7 @@ void UpdateChatBubble() // added to the model skins /*void UpdateColorModHack() { - local float c; + float c; c = self.clientcolors & 15; // LordHavoc: only bothering to support white, green, red, yellow, blue if (!teamplay) self.colormod = '0 0 0'; @@ -2526,16 +2526,16 @@ float nJoinAllowed(float includeMe) { return FALSE; // forced spectators can never join // TODO simplify this - local entity e; + entity e; - local float totalClients; + float totalClients; FOR_EACH_CLIENT(e) totalClients += 1; if (!autocvar_g_maxplayers) return maxclients - totalClients + includeMe; - local float currentlyPlaying; + float currentlyPlaying; FOR_EACH_REALPLAYER(e) currentlyPlaying += 1; diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index 9e211e5f5..9e662bb84 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -35,7 +35,7 @@ void ImpulseCommands (void) { - local float imp; + float imp; vector org; float i; float m; diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 5e1ce239f..79154ed76 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -182,7 +182,7 @@ void PlayerJump (void) } void CheckWaterJump() { - local vector start, end; + vector start, end; // check for a jump-out-of-water makevectors (self.angles); @@ -697,8 +697,8 @@ float speedaward_lastupdate; float speedaward_lastsent; void SV_PlayerPhysics() { - local vector wishvel, wishdir, v; - local float wishspeed, f, maxspd_mod, spd, maxairspd, airaccel, swampspd_mod, buttons; + vector wishvel, wishdir, v; + float wishspeed, f, maxspd_mod, spd, maxairspd, airaccel, swampspd_mod, buttons; string temps; float buttons_prev; float not_allowed_to_move; diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index f8beba94d..298948ffa 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -126,7 +126,7 @@ void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot) void CopyBody(float keepvelocity) { - local entity oldself; + entity oldself; if (self.effects & EF_NODRAW) return; oldself = self; @@ -343,7 +343,7 @@ void SpawnThrownWeapon (vector org, float w) void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { - local float take, save; + float take, save; vector v; Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker); @@ -399,7 +399,7 @@ void freezetag_CheckWinner(); void PlayerDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { - local float take, save, waves, sdelay, dh, da, j; + float take, save, waves, sdelay, dh, da, j; vector v; float valid_damage_for_weaponstats; float excess; @@ -530,7 +530,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht } // throw off bot aim temporarily - local float shake; + float shake; shake = damage * 5 / (bound(0,skill,100) + 1); self.v_angle_x = self.v_angle_x + (random() * 2 - 1) * shake; self.v_angle_y = self.v_angle_y + (random() * 2 - 1) * shake; diff --git a/qcsrc/server/cl_weapons.qc b/qcsrc/server/cl_weapons.qc index 4a333934a..b78859295 100644 --- a/qcsrc/server/cl_weapons.qc +++ b/qcsrc/server/cl_weapons.qc @@ -287,7 +287,7 @@ float W_IsWeaponThrowable(float w) // toss current weapon void W_ThrowWeapon(vector velo, vector delta, float doreduce) { - local float w, wb; + float w, wb; string a; w = self.weapon; @@ -414,7 +414,7 @@ void W_WeaponFrame() // call the think code which may fire the weapon // and do so multiple times to resolve framerate dependency issues if the // server framerate is very low and the weapon fire rate very high - local float c; + float c; c = 0; while (c < W_TICSPERFRAME) { diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index db6ef7991..b426dbb56 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -148,7 +148,7 @@ void W_PlayStrengthSound(entity player) // void W_PlayStrengthSound void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector mi, vector ma, float antilag, float recoil, string snd, float chan, float maxdamage, float range) { float nudge = 1; // added to traceline target and subtracted from result - local float oldsolid; + float oldsolid; vector vecs, dv; oldsolid = ent.dphitcontentsmask; if(ent.weapon == WEP_RIFLE) @@ -558,7 +558,7 @@ void CL_Weaponentity_Think() } self.angles = '0 0 0'; - local float f; + float f; f = 0; if (self.state == WS_RAISE && !intermission_running) { @@ -724,8 +724,8 @@ void Send_WeaponComplain (entity e, float wpn, string wpnname, float type) float client_hasweapon(entity cl, float wpn, float andammo, float complain) { - local float weaponbit, f; - local entity oldself; + float weaponbit, f; + entity oldself; if(time < self.hasweapon_complain_spam) complain = 0; @@ -755,7 +755,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) f = f + weapon_action(wpn, WR_CHECKAMMO2); // always allow selecting the Mine Layer if we placed mines, so that we can detonate them - local entity mine; + entity mine; if(wpn == WEP_MINE_LAYER) for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self) f = 1; @@ -878,7 +878,7 @@ float weapon_prepareattack_checkammo(float secondary) if (!weapon_action(self.weapon, WR_CHECKAMMO1 + secondary)) { // always keep the Mine Layer if we placed mines, so that we can detonate them - local entity mine; + entity mine; if(self.weapon == WEP_MINE_LAYER) for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self) return FALSE; diff --git a/qcsrc/server/clientcommands.qc b/qcsrc/server/clientcommands.qc index f89d38363..2ffa4afd9 100644 --- a/qcsrc/server/clientcommands.qc +++ b/qcsrc/server/clientcommands.qc @@ -174,7 +174,7 @@ void SV_ParseClientCommand(string s) { } else if(cmd == "autoswitch") { // be backwards compatible with older clients (enabled) self.autoswitch = ("0" != argv(1)); - local string autoswitchmsg; + string autoswitchmsg; if (self.autoswitch) { autoswitchmsg = "on"; } else { @@ -450,7 +450,7 @@ void SV_ParseClientCommand(string s) { void ReadyRestartForce() { - local entity e; + entity e; bprint("^1Server is restarting...\n"); @@ -538,8 +538,8 @@ void ReadyRestart() */ void ReadyCount() { - local entity e; - local float r, p; + entity e; + float r, p; r = p = 0; @@ -590,10 +590,10 @@ void evaluateTimeout() { //if the map uses a timelimit make sure that timeout cannot be called right before the map ends if (autocvar_timelimit) { //a timelimit was used - local float myTl; + float myTl; myTl = autocvar_timelimit; - local float lastPossibleTimeout; + float lastPossibleTimeout; lastPossibleTimeout = (myTl*60) - autocvar_sv_timeout_leadtime - 1; if (lastPossibleTimeout < time - game_starttime) diff --git a/qcsrc/server/ctf.qc b/qcsrc/server/ctf.qc index 7b7895845..3d2325ddc 100644 --- a/qcsrc/server/ctf.qc +++ b/qcsrc/server/ctf.qc @@ -257,7 +257,7 @@ void ReturnFlag(entity e) void DropFlag(entity e, entity penalty_receiver, entity attacker) { - local entity p; + entity p; if(e.classname != "item_flag_team") { @@ -333,7 +333,7 @@ void DropFlag(entity e, entity penalty_receiver, entity attacker) void FlagThink() { - local entity e; + entity e; self.nextthink = time + 0.1; @@ -423,9 +423,9 @@ void FlagTouch() { if(gameover) return; - local float t; - local entity player; - local string s, s0, h0, h1; + float t; + entity player; + string s, s0, h0, h1; if (other.classname != "player") return; if (other.health < 1) // ignore dead players @@ -972,7 +972,7 @@ void spawnfunc_ctf_team() // code from here on is just to support maps that don't have control point and team entities void ctf_spawnteam (string teamname, float teamcolor) { - local entity oldself; + entity oldself; oldself = self; self = spawn(); self.classname = "ctf_team"; @@ -1042,7 +1042,7 @@ void ctf_setstatus() self.items &~= IT_BLUE_FLAG_LOST; self.items &~= IT_CTF_SHIELDED; - local entity flag; + entity flag; float redflags, blueflags; if(self.ctf_captureshielded) diff --git a/qcsrc/server/domination.qc b/qcsrc/server/domination.qc index a4cee7471..39a6c35a8 100644 --- a/qcsrc/server/domination.qc +++ b/qcsrc/server/domination.qc @@ -60,8 +60,8 @@ void() dom_spawnteams; void dompoint_captured () { - local entity head; - local float old_delay, old_team, real_team; + entity head; + float old_delay, old_team, real_team; // now that the delay has expired, switch to the latest team to lay claim to this point head = self.owner; @@ -196,7 +196,7 @@ void AnimateDomPoint() void dompointthink() { - local float fragamt; + float fragamt; self.nextthink = time + 0.1; @@ -239,7 +239,7 @@ void dompointthink() void dompointtouch() { - local entity head; + entity head; if (other.classname != "player") return; if (other.health < 1) @@ -340,7 +340,7 @@ void spawnfunc_dom_team() void dom_controlpoint_setup() { - local entity head; + entity head; // find the spawnfunc_dom_team representing unclaimed points head = find(world, classname, "dom_team"); while(head && head.netname != "") @@ -612,7 +612,7 @@ void spawnfunc_dom_controlpoint() // code from here on is just to support maps that don't have control point and team entities void dom_spawnteam (string teamname, float teamcolor, string pointmodel, float pointskin, string capsound, string capnarration, string capmessage) { - local entity oldself; + entity oldself; oldself = self; self = spawn(); self.classname = "dom_team"; @@ -639,7 +639,7 @@ void dom_spawnteam (string teamname, float teamcolor, string pointmodel, float p void dom_spawnpoint(vector org) { - local entity oldself; + entity oldself; oldself = self; self = spawn(); self.classname = "dom_controlpoint"; @@ -670,7 +670,7 @@ void dom_spawnteams() void dom_delayedinit() { - local entity head; + entity head; // if no teams are found, spawn defaults, if custom teams are set, use them if (find(world, classname, "dom_team") == world || autocvar_g_domination_teams_override >= 2) diff --git a/qcsrc/server/ent_cs.qc b/qcsrc/server/ent_cs.qc index f127fb26e..660604332 100644 --- a/qcsrc/server/ent_cs.qc +++ b/qcsrc/server/ent_cs.qc @@ -89,7 +89,7 @@ void entcs_think() entity attach_entcs() { - local entity ent; + entity ent; ent = spawn(); ent.classname = "entcs_sender_v2"; diff --git a/qcsrc/server/extensions.qh b/qcsrc/server/extensions.qh index 57d943438..8aefd1674 100644 --- a/qcsrc/server/extensions.qh +++ b/qcsrc/server/extensions.qh @@ -1385,7 +1385,7 @@ float(entity clent) clienttype = #455; // returns one of the CLIENTTYPE_* consta //How to use: /* // to spawn a bot - local entity oldself; + entity oldself; oldself = self; self = spawnclient(); if (!self) @@ -1401,7 +1401,7 @@ float(entity clent) clienttype = #455; // returns one of the CLIENTTYPE_* consta self = oldself; // to remove all bots - local entity head; + entity head; head = find(world, classname, "player"); while (head) { @@ -2145,7 +2145,7 @@ float(float modlindex, float framenum) frameduration = #277; // returns the inte //"leftarm" (which is a child of "torso") which would return 2 instead... float(float skel, float bonenum, string g1, string g2, string g3, string g4, string g5, string g6) example_skel_findbonegroup = { - local string bonename; + string bonename; while (bonenum >= 0) { bonename = skel_get_bonename(skel, bonenum); @@ -2185,8 +2185,8 @@ void(float animmodelindex, float framegroup, float framegroupstarttime) example_ // apply a different framegroup animation to bones with a specified parent void(float animmodelindex, float framegroup, float framegroupstarttime, float blendalpha, string groupbonename, string excludegroupname1, string excludegroupname2) example_skel_player_update_applyoverride = { - local float bonenum; - local float numbones; + float bonenum; + float numbones; self.frame = framegroup; self.frame2 = 0; self.frame3 = 0; @@ -2210,14 +2210,14 @@ void(float animmodelindex, float framegroup, float framegroupstarttime, float bl // make eyes point at a target location, be sure v_forward, v_right, v_up are set correctly before calling void(vector eyetarget, string bonename) example_skel_player_update_eyetarget = { - local float bonenum; - local vector ang; - local vector oldforward, oldright, oldup; - local vector relforward, relright, relup, relorg; - local vector boneforward, boneright, boneup, boneorg; - local vector parentforward, parentright, parentup, parentorg; - local vector u, v; - local vector modeleyetarget; + float bonenum; + vector ang; + vector oldforward, oldright, oldup; + vector relforward, relright, relup, relorg; + vector boneforward, boneright, boneup, boneorg; + vector parentforward, parentright, parentup, parentorg; + vector u, v; + vector modeleyetarget; bonenum = skel_find_bone(self.skeletonindex, bonename) - 1; if (bonenum < 0) return; diff --git a/qcsrc/server/func_breakable.qc b/qcsrc/server/func_breakable.qc index 192e5cd7f..46cde588d 100644 --- a/qcsrc/server/func_breakable.qc +++ b/qcsrc/server/func_breakable.qc @@ -83,7 +83,7 @@ void func_breakable_colormod() void func_breakable_look_destroyed() { - local float floor_z; + float floor_z; if(self.solid == SOLID_BSP) // in case a misc_follow moved me, save the current origin first self.dropped_origin = self.origin; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 994ee260b..7aeda69af 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -501,7 +501,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if (gameover || targ.killcount == -666) return; - local entity oldself; + entity oldself; oldself = self; self = targ; damage_targ = targ; @@ -985,13 +985,13 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e finaldmg = coredamage * power + edgedamage * (1 - power); if (finaldmg > 0) { - local float a; - local float c; - local float hits; - local float total; - local float hitratio; - local vector hitloc; - local vector myblastorigin; + float a; + float c; + float hits; + float total; + float hitratio; + vector hitloc; + vector myblastorigin; myblastorigin = WarpZone_TransformOrigin(targ, blastorigin); center = targ.origin + (targ.mins + targ.maxs) * 0.5; // if it's a player, use the view origin as reference diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 5561c2df9..ce815fad4 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -292,8 +292,8 @@ void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, floa void FireGrapplingHook (void) { - local entity missile; - local vector org; + entity missile; + vector org; float s; vector vs; diff --git a/qcsrc/server/g_lights.qc b/qcsrc/server/g_lights.qc index d5cc657bf..a8dc1f99b 100644 --- a/qcsrc/server/g_lights.qc +++ b/qcsrc/server/g_lights.qc @@ -37,7 +37,7 @@ void dynlight_think() }; void dynlight_find_aiment() { - local entity targ; + entity targ; if (!self.target) objerror ("dynlight: no target to follow"); @@ -53,7 +53,7 @@ void dynlight_find_aiment() }; void dynlight_find_path() { - local entity targ; + entity targ; if (!self.target) objerror ("dynlight: no target to follow"); @@ -65,7 +65,7 @@ void dynlight_find_path() }; void dynlight_find_target() { - local entity targ; + entity targ; if (!self.target) objerror ("dynlight: no target to follow"); diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index c397079e9..0649c89a1 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -370,8 +370,8 @@ Additionally it moves players back into the past before the trace and restores t */ void tracebox_antilag_force_wz (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag, float wz) { - local entity player; - local float oldsolid; + entity player; + float oldsolid; // check whether antilagged traces are enabled if (lag < 0.001) diff --git a/qcsrc/server/g_tetris.qc b/qcsrc/server/g_tetris.qc index 21208a2a1..c07ef8806 100644 --- a/qcsrc/server/g_tetris.qc +++ b/qcsrc/server/g_tetris.qc @@ -343,7 +343,7 @@ void WriteTetrisString(string s) float pnum(float num, float dig) { - local float f, i; + float f, i; if (num < 0) { WriteChar(MSG_ONE, 173); @@ -1154,7 +1154,7 @@ float angcompa(float y1, float y2) y1 = frik_anglemoda(y1); y2 = frik_anglemoda(y2); - local float answer; + float answer; answer = y1 - y2; if (answer > 180) answer = answer - 360; diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index 19442cd6c..321b5b2c7 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -33,7 +33,7 @@ match (string)self.target and call their .use function */ void SUB_UseTargets() { - local entity t, stemp, otemp, act; + entity t, stemp, otemp, act; string s; float i; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 93157819e..00d96cbd3 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -101,7 +101,7 @@ void fteqcc_testbugs() * players. Also plays reminder sounds. */ void timeoutHandler_Think() { - local entity plr; + entity plr; if (timeoutStatus == 1) { if (remainingLeadTime > 0) { //centerprint the information to every player @@ -628,7 +628,7 @@ void spawnfunc_worldspawn (void) allowed_to_spawn = TRUE; - local entity head; + entity head; head = nextent(world); maxclients = 0; while(head) @@ -1292,9 +1292,9 @@ float DoNextMapOverride() void GotoNextMap() { - //local string nextmap; - //local float n, nummaps; - //local string s; + //string nextmap; + //float n, nummaps; + //string s; if (alreadychangedlevel) return; alreadychangedlevel = TRUE; @@ -1732,7 +1732,7 @@ void ClearWinners(void) float WinningCondition_Onslaught() { entity head; - local float t1, t2, t3, t4; + float t1, t2, t3, t4; WinningConditionHelper(); // set worldstatus @@ -1792,7 +1792,7 @@ float LMS_NewPlayerLives() void assault_new_round(); float WinningCondition_Assault() { - local float status; + float status; WinningConditionHelper(); // set worldstatus @@ -1807,7 +1807,7 @@ float WinningCondition_Assault() SetWinners(team, COLOR_TEAM1); } - local entity ent; + entity ent; ent = find(world, classname, "target_assault_roundend"); if(ent) { @@ -1824,7 +1824,7 @@ float WinningCondition_Assault() } else { - local entity oldself; + entity oldself; oldself = self; self = ent; assault_new_round(); diff --git a/qcsrc/server/gamecommand.qc b/qcsrc/server/gamecommand.qc index a8537a0ae..f26f828ec 100644 --- a/qcsrc/server/gamecommand.qc +++ b/qcsrc/server/gamecommand.qc @@ -854,7 +854,7 @@ void GameCommand(string command) if (argv(0) == "nospectators") { blockSpectators = 1; - local entity plr; + entity plr; FOR_EACH_CLIENT(plr) //give every spectator seconds time to become a player { if(plr.classname == "spectator" || plr.classname == "observer") @@ -1259,7 +1259,7 @@ void GameCommand(string command) if(argv(0) == "bot_cmd") { - local entity bot; + entity bot; if(argv(1) == "help") { diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index c80e9ca03..489735585 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -740,7 +740,7 @@ string playername(entity p) vector randompos(vector m1, vector m2) { - local vector v; + vector v; m2 = m2 - m1; v_x = m2_x * random() + m1_x; v_y = m2_y * random() + m1_y; @@ -1458,7 +1458,7 @@ float spamsound(entity e, float chan, string samp, float vol, float atten) void play2team(float t, string filename) { - local entity head; + entity head; if (autocvar_bot_sound_monopoly) return; @@ -1632,7 +1632,7 @@ void precache() if(autocvar_sv_precacheweapons) { //precache weapon models/sounds - local float wep; + float wep; wep = WEP_FIRST; while (wep <= WEP_LAST) { diff --git a/qcsrc/server/mode_onslaught.qc b/qcsrc/server/mode_onslaught.qc index 4f8aee2e7..33cfab2ec 100644 --- a/qcsrc/server/mode_onslaught.qc +++ b/qcsrc/server/mode_onslaught.qc @@ -47,7 +47,7 @@ void ons_throwgib_think() void ons_throwgib(vector v_from, vector v_to, string smodel, float f_lifetime, float b_burn) { - local entity gib; + entity gib; gib = spawn(); @@ -74,8 +74,8 @@ void ons_throwgib(vector v_from, vector v_to, string smodel, float f_lifetime, f void onslaught_updatelinks() { - local entity l, links; - local float stop, t1, t2, t3, t4; + entity l, links; + float stop, t1, t2, t3, t4; // first check if the game has ended dprint("--- updatelinks ---\n"); links = findchain(classname, "onslaught_link"); @@ -375,8 +375,8 @@ float onslaught_controlpoint_attackable(entity cp, float t) float overtime_msg_time; void onslaught_generator_think() { - local float d; - local entity e; + float d; + entity e; self.nextthink = ceil(time + 1); if (!gameover) { @@ -482,8 +482,8 @@ void onslaught_generator_damage_spawn(entity gd_owner) void onslaught_generator_deaththink() { - local vector org; - local float i; + vector org; + float i; if not (self.count) self.count = 40; @@ -548,7 +548,7 @@ void onslaught_generator_deaththink() void onslaught_generator_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { - local float i; + float i; if (damage <= 0) return; if(inWarmupStage) @@ -850,7 +850,7 @@ void spawnfunc_onslaught_generator() return; } - local entity e; + entity e; precache_model("models/onslaught/generator.md3"); precache_model("models/onslaught/generator_shield.md3"); precache_model("models/onslaught/generator_dmg1.md3"); @@ -1143,7 +1143,7 @@ void onslaught_controlpoint_icon_think() void onslaught_controlpoint_icon_buildthink() { - local entity oself; + entity oself; float a; self.nextthink = time + sys_frametime; @@ -1195,7 +1195,7 @@ void onslaught_controlpoint_icon_buildthink() void onslaught_controlpoint_touch() { - local entity e; + entity e; float a; if (other.classname != "player") return; @@ -1267,7 +1267,7 @@ keys: */ void spawnfunc_onslaught_controlpoint() { - local entity e; + entity e; if (!g_onslaught) { remove(self); diff --git a/qcsrc/server/monsters/ai.qc b/qcsrc/server/monsters/ai.qc index b7c775578..4c179ce6d 100644 --- a/qcsrc/server/monsters/ai.qc +++ b/qcsrc/server/monsters/ai.qc @@ -101,7 +101,7 @@ moving towards it, change the next destination and continue. */ void() t_movetarget = { - local entity temp; + entity temp; if (other.health < 1) return; @@ -133,8 +133,8 @@ void() t_movetarget = void() monster_wanderpaththink = { - local vector v, v1; - local float b, c; + vector v, v1; + float b, c; self.nextthink = time + random() * 10 + 1; if (self.owner.health < 1) // dead, also handled in death code { @@ -194,8 +194,8 @@ void() monster_checkbossflag = { //#NO AUTOCVARS START #if 0 - local float healthboost; - local float r; + float healthboost; + float r; // monsterbosses cvar or spawnflag 64 causes a monster to be a miniboss if ((self.spawnflags & 64) || (random() * 100 < cvar("monsterbosspercent"))) @@ -246,7 +246,7 @@ returns the range catagorization of an entity reletive to self */ float(entity targ) range = { - local float r; + float r; r = vlen ((self.origin + self.view_ofs) - (targ.origin + targ.view_ofs)); if (r < 120) return RANGE_MELEE; @@ -289,7 +289,7 @@ returns 1 if the entity is in front (in sight) of self */ float(entity targ) infront = { - local float dot; + float dot; makevectors (self.angles); dot = normalize (targ.origin - self.origin) * v_forward; @@ -299,7 +299,7 @@ float(entity targ) infront = // returns 0 if not infront, or the dotproduct if infront float(vector dir, entity targ) infront2 = { - local float dot; + float dot; dir = normalize(dir); dot = normalize (targ.origin - self.origin) * dir; @@ -324,7 +324,7 @@ Called every 0.1 sec by monsters void() ChangeYaw = { - local float ideal, move; + float ideal, move; //current_yaw = self.ideal_yaw; // mod down the current angle @@ -418,8 +418,8 @@ entity havocbot_list; entity() checkplayer = { - local entity check; - local float worldcount; + entity check; + float worldcount; // we can just fallback on checkclient if there are no bots if (!havocbot_list) return checkclient(); @@ -483,8 +483,8 @@ slower noticing monsters. .float findtarget; float() FindTarget = { - local entity client; - local float r; + entity client; + float r; if (self.health < 1) return FALSE; @@ -746,7 +746,7 @@ ChooseTurn */ void(vector pDestvec) ChooseTurn = { - local vector dir, newdir; + vector dir, newdir; dir = self.origin - pDestvec; @@ -777,7 +777,7 @@ FacingIdeal */ float() FacingIdeal = { - local float delta; + float delta; delta = anglemod(self.angles_y - self.ideal_yaw); if (delta > 45 && delta < 315) @@ -801,7 +801,7 @@ The monster has an enemy it is trying to kill */ void(float dist) ai_run = { - local float ofs; + float ofs; if (self.health < 1) return; movedist = dist; diff --git a/qcsrc/server/monsters/fight.qc b/qcsrc/server/monsters/fight.qc index 10d00a16b..314838b9a 100644 --- a/qcsrc/server/monsters/fight.qc +++ b/qcsrc/server/monsters/fight.qc @@ -68,9 +68,9 @@ Returns FALSE if movement should continue */ float() GenericCheckAttack = { - local vector spot1, spot2; - local entity targ; - local float chance; + vector spot1, spot2; + entity targ; + float chance; if (self.health < 1) return FALSE; @@ -179,8 +179,8 @@ void() ai_charge_side = { if (self.health < 1) return; - local vector dtemp; - local float heading; + vector dtemp; + float heading; // aim to the left of the enemy for a flyby @@ -203,8 +203,8 @@ ai_melee */ void() ai_melee = { - local vector delta; - local float ldmg; + vector delta; + float ldmg; if (self.health < 1) return; @@ -227,8 +227,8 @@ void() ai_melee = void() ai_melee_side = { - local vector delta; - local float ldmg; + vector delta; + float ldmg; if (self.health < 1) return; diff --git a/qcsrc/server/monsters/m_monsters.qc b/qcsrc/server/monsters/m_monsters.qc index ee77b5445..c43538e02 100644 --- a/qcsrc/server/monsters/m_monsters.qc +++ b/qcsrc/server/monsters/m_monsters.qc @@ -156,7 +156,7 @@ void() monster_death_use = void() monsterinwall = { - local entity e; + entity e; if (!autocvar_developer) return; // this is handy for level designers, @@ -466,7 +466,7 @@ void() swimmonster_start = void(vector org, float bodydamage, float armordamage, vector force, float damgtype) genericbleedfunc = { - local vector v; + vector v; v = '0 0 0' - force * 0.05; if (armordamage > 0) te_spark(org, v, armordamage * 3); diff --git a/qcsrc/server/nexball.qc b/qcsrc/server/nexball.qc index 3aa65f6f5..a28620cd4 100644 --- a/qcsrc/server/nexball.qc +++ b/qcsrc/server/nexball.qc @@ -79,7 +79,7 @@ void ball_restart (void) void nexball_setstatus (void) { - local entity oldself; + entity oldself; self.items &~= IT_KEY1; if (self.ballcarried) { @@ -118,7 +118,7 @@ void football_touch(); void DropOwner (void) { - local entity ownr; + entity ownr; ownr = self.owner; DropBall(self, ownr.origin, ownr.velocity); makevectors(ownr.v_angle_y * '0 1 0'); @@ -128,7 +128,7 @@ void DropOwner (void) void GiveBall (entity plyr, entity ball) { - local entity ownr; + entity ownr; if ((ownr = ball.owner)) { @@ -407,7 +407,7 @@ void spawnfunc_nexball_team (void) void nb_spawnteam (string teamname, float teamcolor) { dprint("^2spawned team ", teamname, "\n"); - local entity e; + entity e; e = spawn(); e.classname = "nexball_team"; e.netname = teamname; @@ -592,7 +592,7 @@ void spawnfunc_ball_bound (void) { spawnfunc_nexball_out(); } void W_Nexball_Touch (void) { - local entity ball, attacker; + entity ball, attacker; attacker = self.owner; PROJECTILE_TOUCH; @@ -621,8 +621,8 @@ void W_Nexball_Touch (void) void W_Nexball_Attack (float t) { - local entity ball; - local float mul, mi, ma; + entity ball; + float mul, mi, ma; if (!(ball = self.ballcarried)) return; @@ -654,7 +654,7 @@ void W_Nexball_Attack (float t) void W_Nexball_Attack2 (void) { - local entity missile; + entity missile; if (!(balls & BALL_BASKET)) return; W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav", CH_WEAPON_A, 0); diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 0c0801eaa..03293e6fa 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -855,7 +855,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, */ void minstagib_items (float itemid) { - local float rnd; + float rnd; self.classname = "minstagib"; // replace rocket launchers and nex guns with ammo cells diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index 07ed967fe..abb0c306d 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -30,8 +30,8 @@ void trigger_push_use() vector trigger_push_calculatevelocity(vector org, entity tgt, float ht) { - local float grav, sdist, zdist, vs, vz, jumpheight; - local vector sdir, torg; + float grav, sdist, zdist, vs, vz, jumpheight; + vector sdir, torg; torg = tgt.origin + (tgt.mins + tgt.maxs) * 0.5; @@ -175,12 +175,12 @@ void trigger_push_touch() sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM); self.pushltime = time + 0.2; } - local float ct; + float ct; ct = clienttype(other); if( ct == CLIENTTYPE_REAL || ct == CLIENTTYPE_BOT) { - local float i; - local float found; + float i; + float found; found = FALSE; for(i = 0; i < other.jumppadcount && i < NUM_JUMPPADSUSED; ++i) if(other.(jumppadsused[i]) == self) @@ -252,8 +252,8 @@ void trigger_push_touch() .vector dest; void trigger_push_findtarget() { - local entity e, t; - local vector org; + entity e, t; + vector org; // first calculate a typical start point for the jump org = (self.absmin + self.absmax) * 0.5; diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index ca87ede22..7cd996555 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -31,8 +31,8 @@ float PLAT_LOW_TRIGGER = 1; void plat_spawn_inside_trigger() { - local entity trigger; - local vector tmin, tmax; + entity trigger; + vector tmin, tmax; trigger = spawn(); trigger.touch = plat_center_touch; @@ -269,7 +269,7 @@ void train_wait() void train_next() { - local entity targ; + entity targ; targ = find(world, targetname, self.target); self.enemy = targ; self.target = targ.target; @@ -290,7 +290,7 @@ void train_next() void func_train_find() { - local entity targ; + entity targ; targ = find(world, targetname, self.target); self.target = targ.target; if (!self.target) @@ -413,7 +413,7 @@ void spawnfunc_func_rotating() .float height; void func_bobbing_controller_think() { - local vector v; + vector v; self.nextthink = time + 0.1; if not (self.owner.active == ACTIVE_ACTIVE) @@ -441,7 +441,7 @@ dmgtime : See above. */ void spawnfunc_func_bobbing() { - local entity controller; + entity controller; if (self.noise != "") { precache_sound(self.noise); @@ -497,7 +497,7 @@ void spawnfunc_func_bobbing() .float freq; void func_pendulum_controller_think() { - local float v; + float v; self.nextthink = time + 0.1; if not (self.owner.active == ACTIVE_ACTIVE) @@ -518,7 +518,7 @@ void func_pendulum_controller_think() void spawnfunc_func_pendulum() { - local entity controller; + entity controller; if (self.noise != "") { precache_sound(self.noise); @@ -895,8 +895,8 @@ ACTIVATION FUNCTIONS void door_fire() { - local entity oself; - local entity starte; + entity oself; + entity starte; if (self.owner != self) objerror ("door_fire: self.owner != self"); @@ -955,7 +955,7 @@ void door_fire() void door_use() { - local entity oself; + entity oself; //dprint("door_use (model: ");dprint(self.model);dprint(")\n"); if (self.owner) @@ -987,7 +987,7 @@ void door_trigger_touch() void door_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { - local entity oself; + entity oself; if(self.spawnflags & DOOR_NOSPLASH) if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH)) return; @@ -1142,8 +1142,8 @@ SPAWNING FUNCTIONS entity spawn_field(vector fmins, vector fmaxs) { - local entity trigger; - local vector t1, t2; + entity trigger; + vector t1, t2; trigger = spawn(); trigger.classname = "doortriggerfield"; @@ -1186,8 +1186,8 @@ LinkDoors */ void LinkDoors() { - local entity t, starte; - local vector cmins, cmaxs; + entity t, starte; + vector cmins, cmaxs; if (self.enemy) return; // already linked by another door @@ -1526,7 +1526,7 @@ float SECRET_YES_SHOOT = 16; // shootable even if targeted void fd_secret_use() { - local float temp; + float temp; string message_save; self.health = 10000; @@ -1752,7 +1752,7 @@ dmgtime: See above. void func_fourier_controller_think() { - local vector v; + vector v; float n, i, t; self.nextthink = time + 0.1; @@ -1781,7 +1781,7 @@ void func_fourier_controller_think() void spawnfunc_func_fourier() { - local entity controller; + entity controller; if (self.noise != "") { precache_sound(self.noise); @@ -1918,7 +1918,7 @@ void func_vectormamamam_findtarget() self.destvec = self.origin - func_vectormamamam_origin(self.owner, 0); - local entity controller; + entity controller; controller = spawn(); controller.classname = "func_vectormamamam_controller"; controller.owner = self; diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index c5f8988b9..dbba54c4d 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -437,7 +437,7 @@ void InitGameplayMode() } string GetClientVersionMessage() { - local string versionmsg; + string versionmsg; if (self.version_mismatch) { if(self.version < autocvar_gameversion) { versionmsg = "^3Your client version is outdated.\n\n\n### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###\n\n\nPlease update!!!^8"; @@ -487,7 +487,7 @@ string getwelcomemessage(void) modifications = strcat(modifications, ", Jet pack"); modifications = substring(modifications, 2, strlen(modifications) - 2); - local string versionmessage; + string versionmessage; versionmessage = GetClientVersionMessage(); s = strcat("This is Xonotic ", autocvar_g_xonoticversion, "\n", versionmessage); @@ -1275,7 +1275,7 @@ void AuditTeams() // code from here on is just to support maps that don't have team entities void tdm_spawnteam (string teamname, float teamcolor) { - local entity e; + entity e; e = spawn(); e.classname = "tdm_team"; e.netname = teamname; diff --git a/qcsrc/server/tturrets/system/system_misc.qc b/qcsrc/server/tturrets/system/system_misc.qc index f97f1091f..b870e0f55 100644 --- a/qcsrc/server/tturrets/system/system_misc.qc +++ b/qcsrc/server/tturrets/system/system_misc.qc @@ -135,8 +135,8 @@ void FireImoBeam (vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float f_velfactor, float deathtype) { - local vector hitloc, force, endpoint, dir; - local entity ent; + vector hitloc, force, endpoint, dir; + entity ent; dir = normalize(end - start); force = dir * bforce; diff --git a/qcsrc/server/tturrets/units/unit_flac.qc b/qcsrc/server/tturrets/units/unit_flac.qc index e5360d887..3cd2a6cc2 100644 --- a/qcsrc/server/tturrets/units/unit_flac.qc +++ b/qcsrc/server/tturrets/units/unit_flac.qc @@ -5,7 +5,7 @@ void turret_flac_projectile_explode(); void turret_flac_attack() { - local entity proj; + entity proj; turret_tag_fire_update(); diff --git a/qcsrc/server/tturrets/units/unit_hk.qc b/qcsrc/server/tturrets/units/unit_hk.qc index 5ad222fa0..5926e3572 100644 --- a/qcsrc/server/tturrets/units/unit_hk.qc +++ b/qcsrc/server/tturrets/units/unit_hk.qc @@ -82,8 +82,8 @@ void turret_hk_missile_damage (entity inflictor, entity attacker, float damage, void turret_hk_attack() { - local entity missile; - //local entity flash2; + entity missile; + //entity flash2; sound (self, CH_WEAPON_A, "weapons/rocket_fire.wav", VOL_BASE, ATTN_NORM); diff --git a/qcsrc/server/vote.qc b/qcsrc/server/vote.qc index 55570c6f2..3043ceaab 100644 --- a/qcsrc/server/vote.qc +++ b/qcsrc/server/vote.qc @@ -117,7 +117,7 @@ float RemapVote(string vote, string cmd, entity e) } float GameCommand_Vote(string s, entity e) { - local float playercount; + float playercount; float argc; argc = tokenize_console(s); if(argv(0) == "help") { @@ -145,7 +145,7 @@ float GameCommand_Vote(string s, entity e) { else if(votecalled) { print_to(e, "^1There is already a vote called."); } else { - local string vote; + string vote; vote = VoteParse(s, argc); if(vote == "") { print_to(e, "^1Your vote is empty. See 'vhelp' for more info."); @@ -172,7 +172,7 @@ float GameCommand_Vote(string s, entity e) { VoteCount(); // needed if you are the only one msg_entity = e; - local entity player; + entity player; FOR_EACH_REALCLIENT(player) { ++playercount; @@ -224,7 +224,7 @@ float GameCommand_Vote(string s, entity e) { } } else if(argv(1) == "do") { if(!e || e.vote_master) { - local string dovote; + string dovote; dovote = VoteParse(s, argc); if(dovote == "") { print_to(e, "^1Your command was empty. See 'vhelp' for more info."); @@ -242,10 +242,10 @@ float GameCommand_Vote(string s, entity e) { print_to(e, "^1You are NOT a master. You might need to login or vote to become master first. See 'vhelp' for more info."); } } else if(argv(1) == "login") { - local string masterpwd; + string masterpwd; masterpwd = autocvar_sv_vote_master_password; if(masterpwd != "") { - local float granted; + float granted; granted = (masterpwd == argv(2)); if (e) e.vote_master = granted; @@ -318,17 +318,17 @@ float GameCommand_Vote(string s, entity e) { } void VoteHelp(entity e) { - local string vmasterdis; + string vmasterdis; if(!autocvar_sv_vote_master) { vmasterdis = " ^1(disabled)"; } - local string vlogindis; + string vlogindis; if("" == autocvar_sv_vote_master_password) { vlogindis = " ^1(disabled)"; } - local string vcalldis; + string vcalldis; if(!autocvar_sv_vote_call) { vcalldis = " ^1(disabled)"; } @@ -439,7 +439,7 @@ float VoteAllowed(string votecommand, string cmd) { } void VoteReset() { - local entity player; + entity player; FOR_EACH_CLIENT(player) { @@ -535,17 +535,17 @@ void VoteSpam(float notvoters, float mincount, string result) } void VoteCount() { - local float playercount; + float playercount; playercount = 0; vote_yescount = 0; vote_nocount = 0; vote_abstaincount = 0; - local entity player; + entity player; //same for real players - local float realplayercount; - local float realplayeryescount; - local float realplayernocount; - local float realplayerabstaincount; + float realplayercount; + float realplayeryescount; + float realplayernocount; + float realplayerabstaincount; realplayercount = realplayernocount = realplayerabstaincount = realplayeryescount = 0; Nagger_VoteCountChanged(); diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index d0dd6eca6..08c56121b 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -26,9 +26,9 @@ void W_GiveWeapon (entity e, float wep, string name) .vector railgunforce; void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype) { - local vector hitloc, force, endpoint, dir; - local entity ent, endent; - local float endq3surfaceflags; + vector hitloc, force, endpoint, dir; + entity ent, endent; + float endq3surfaceflags; float totaldmg; entity o; diff --git a/qcsrc/server/w_crylink.qc b/qcsrc/server/w_crylink.qc index aa72d8ec1..0c3faddd4 100644 --- a/qcsrc/server/w_crylink.qc +++ b/qcsrc/server/w_crylink.qc @@ -315,9 +315,9 @@ void W_Crylink_Fadethink (void) void W_Crylink_Attack (void) { - local float counter, shots; - local entity proj, prevproj, firstproj; - local vector s; + float counter, shots; + entity proj, prevproj, firstproj; + vector s; vector forward, right, up; float maxdmg; @@ -425,8 +425,8 @@ void W_Crylink_Attack (void) void W_Crylink_Attack2 (void) { - local float counter, shots; - local entity proj, prevproj, firstproj; + float counter, shots; + entity proj, prevproj, firstproj; float maxdmg; W_DecreaseAmmo(ammo_cells, autocvar_g_balance_crylink_secondary_ammo, autocvar_g_balance_crylink_reload_ammo); diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index b127f5cba..09f684d9c 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -9,7 +9,7 @@ void W_Plasma_Explode_Combo (void); void W_Plasma_TriggerCombo(vector org, float rad, entity own) { - local entity e; + entity e; e = WarpZone_FindRadius(org, rad, TRUE); while (e) { @@ -114,7 +114,7 @@ void W_Plasma_Damage (entity inflictor, entity attacker, float damage, float dea void W_Electro_Attack() { - local entity proj; + entity proj; W_DecreaseAmmo(ammo_cells, autocvar_g_balance_electro_primary_ammo, autocvar_g_balance_electro_reload_ammo); @@ -148,7 +148,7 @@ void W_Electro_Attack() void W_Electro_Attack2() { - local entity proj; + entity proj; W_DecreaseAmmo(ammo_cells, autocvar_g_balance_electro_secondary_ammo, autocvar_g_balance_electro_reload_ammo); diff --git a/qcsrc/server/w_fireball.qc b/qcsrc/server/w_fireball.qc index 31e5b6a02..3d90fe398 100644 --- a/qcsrc/server/w_fireball.qc +++ b/qcsrc/server/w_fireball.qc @@ -129,7 +129,7 @@ void W_Fireball_Damage (entity inflictor, entity attacker, float damage, float d void W_Fireball_Attack1() { - local entity proj; + entity proj; W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", CH_WEAPON_A, autocvar_g_balance_fireball_primary_damage + autocvar_g_balance_fireball_primary_bfgdamage); @@ -245,7 +245,7 @@ void W_Firemine_Touch (void) void W_Fireball_Attack2() { - local entity proj; + entity proj; vector f_diff; float c; diff --git a/qcsrc/server/w_grenadelauncher.qc b/qcsrc/server/w_grenadelauncher.qc index 223d89fda..b5bfa47a2 100644 --- a/qcsrc/server/w_grenadelauncher.qc +++ b/qcsrc/server/w_grenadelauncher.qc @@ -167,7 +167,7 @@ void W_Grenade_Touch2 (void) void W_Grenade_Attack (void) { - local entity gren; + entity gren; W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_grenadelauncher_primary_ammo, autocvar_g_balance_grenadelauncher_reload_ammo); @@ -215,7 +215,7 @@ void W_Grenade_Attack (void) void W_Grenade_Attack2 (void) { - local entity gren; + entity gren; W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_grenadelauncher_secondary_ammo, autocvar_g_balance_grenadelauncher_reload_ammo); diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 7d9db5c39..b0106a28e 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -67,7 +67,7 @@ void W_Hagar_Touch2 (void) void W_Hagar_Attack (void) { - local entity missile; + entity missile; W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_reload_ammo); @@ -109,7 +109,7 @@ void W_Hagar_Attack (void) void W_Hagar_Attack2 (void) { - local entity missile; + entity missile; W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo, autocvar_g_balance_hagar_reload_ammo); @@ -155,9 +155,9 @@ void W_Hagar_Attack2_Load_Release (void) { // time to release the rockets we've loaded - local entity missile; - local float counter, shots, spread_pershot; - local vector s; + entity missile; + float counter, shots, spread_pershot; + vector s; vector forward, right, up; if(!self.hagar_load) @@ -236,7 +236,7 @@ void W_Hagar_Attack2_Load (void) { // loadable hagar secondary attack, must always run each frame - local float loaded, enough_ammo; + float loaded, enough_ammo; loaded = self.hagar_load >= autocvar_g_balance_hagar_secondary_load_max; // this is different than WR_CHECKAMMO when it comes to reloading @@ -349,7 +349,7 @@ float w_hagar(float req) } else if (req == WR_THINK) { - local float loadable_secondary; + float loadable_secondary; loadable_secondary = autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary; if (loadable_secondary) diff --git a/qcsrc/server/w_hlac.qc b/qcsrc/server/w_hlac.qc index 0a163e2f9..9359ab44f 100644 --- a/qcsrc/server/w_hlac.qc +++ b/qcsrc/server/w_hlac.qc @@ -19,7 +19,7 @@ void W_HLAC_Touch (void) void W_HLAC_Attack (void) { - local entity missile; + entity missile; float spread; W_DecreaseAmmo(ammo_cells, autocvar_g_balance_hlac_primary_ammo, autocvar_g_balance_hlac_reload_ammo); @@ -68,7 +68,7 @@ void W_HLAC_Attack (void) void W_HLAC_Attack2f (void) { - local entity missile; + entity missile; float spread; spread = autocvar_g_balance_hlac_secondary_spread; diff --git a/qcsrc/server/w_hook.qc b/qcsrc/server/w_hook.qc index b6b90f693..8a93b0da2 100644 --- a/qcsrc/server/w_hook.qc +++ b/qcsrc/server/w_hook.qc @@ -74,7 +74,7 @@ void W_Hook_Touch2 (void) void W_Hook_Attack2() { - local entity gren; + entity gren; W_DecreaseAmmo(ammo_cells, autocvar_g_balance_hook_secondary_ammo, FALSE); W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", CH_WEAPON_A, autocvar_g_balance_hook_secondary_damage); diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index fa52a6e0d..a34695ee8 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -31,7 +31,7 @@ void W_Laser_Think() void W_Laser_Attack (float issecondary) { - local entity missile; + entity missile; vector s_forward; float a; float nodamage; @@ -215,8 +215,8 @@ void spawnfunc_weapon_laser (void) float w_laser(float req) { - local float r1; - local float r2; + float r1; + float r2; if (req == WR_AIM) { if(autocvar_g_balance_laser_secondary) diff --git a/qcsrc/server/w_porto.qc b/qcsrc/server/w_porto.qc index 4d3b8588e..9fb318fd9 100644 --- a/qcsrc/server/w_porto.qc +++ b/qcsrc/server/w_porto.qc @@ -156,7 +156,7 @@ void W_Porto_Touch (void) void W_Porto_Attack (void) { - local entity gren; + entity gren; if not(self.items & IT_UNLIMITED_SUPERWEAPONS) self.weapons = self.weapons - (self.weapons & WEPBIT_PORTO); diff --git a/qcsrc/server/w_rocketlauncher.qc b/qcsrc/server/w_rocketlauncher.qc index 4abfa0d50..1584e7aa5 100644 --- a/qcsrc/server/w_rocketlauncher.qc +++ b/qcsrc/server/w_rocketlauncher.qc @@ -251,8 +251,8 @@ void W_Rocket_Damage (entity inflictor, entity attacker, float damage, float dea void W_Rocket_Attack (void) { - local entity missile; - local entity flash; + entity missile; + entity flash; W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_rocketlauncher_ammo, autocvar_g_balance_rocketlauncher_reload_ammo); @@ -320,9 +320,9 @@ float w_rlauncher(float req) if(skill >= 2) // skill 0 and 1 bots won't detonate rockets! { // decide whether to detonate rockets - local entity missile, targetlist, targ; - local float edgedamage, coredamage, edgeradius, recipricoledgeradius, d; - local float selfdamage, teamdamage, enemydamage; + entity missile, targetlist, targ; + float edgedamage, coredamage, edgeradius, recipricoledgeradius, d; + float selfdamage, teamdamage, enemydamage; edgedamage = autocvar_g_balance_rocketlauncher_edgedamage; coredamage = autocvar_g_balance_rocketlauncher_damage; edgeradius = autocvar_g_balance_rocketlauncher_radius; @@ -355,7 +355,7 @@ float w_rlauncher(float req) } missile = find(missile, classname, "rocket"); } - local float desirabledamage; + float desirabledamage; desirabledamage = enemydamage; if (time > self.invincible_finished && time > self.spawnshieldtime) desirabledamage = desirabledamage - selfdamage * autocvar_g_balance_selfdamagepercent; @@ -384,7 +384,7 @@ float w_rlauncher(float req) targ = targ.chain; } }else{ - local float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000); + float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000); //As the distance gets larger, a correct detonation gets near imposible //Bots are assumed to use the rocket spawnfunc_light to see if the rocket gets near a player if(v_forward * normalize(missile.origin - self.enemy.origin)< 0.1) diff --git a/qcsrc/server/w_seeker.qc b/qcsrc/server/w_seeker.qc index 40c119035..4eb710764 100644 --- a/qcsrc/server/w_seeker.qc +++ b/qcsrc/server/w_seeker.qc @@ -164,7 +164,7 @@ void Seeker_Missile_Animate() void Seeker_Fire_Missile(vector f_diff, entity m_target) { - local entity missile; + entity missile; W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_reload_ammo); @@ -235,7 +235,7 @@ void Seeker_Flac_Touch() void Seeker_Fire_Flac() { - local entity missile; + entity missile; vector f_diff; float c; @@ -472,7 +472,7 @@ void Seeker_Tag_Touch() void Seeker_Fire_Tag() { - local entity missile; + entity missile; W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_seeker_tag_ammo, autocvar_g_balance_seeker_reload_ammo); W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", CH_WEAPON_A, autocvar_g_balance_seeker_missile_damage * autocvar_g_balance_seeker_missile_count); diff --git a/qcsrc/server/w_shotgun.qc b/qcsrc/server/w_shotgun.qc index b21a5f50a..ec6a491ab 100644 --- a/qcsrc/server/w_shotgun.qc +++ b/qcsrc/server/w_shotgun.qc @@ -13,7 +13,7 @@ void W_Shotgun_Attack (void) float spread; float bulletspeed; float bulletconstant; - local entity flash; + entity flash; ammoamount = autocvar_g_balance_shotgun_primary_ammo; bullets = autocvar_g_balance_shotgun_primary_bullets; -- 2.39.2