From 3be5c77603fa82048a5d44991da5992b67355d39 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 19 Feb 2002 00:19:27 +0000 Subject: [PATCH] clean up a bunch of unused local params --- quake/ai.qc | 6 ------ quake/buttons.qc | 2 -- quake/client.qc | 11 ----------- quake/demon.qc | 2 -- quake/dog.qc | 2 -- quake/enforcer.qc | 5 +++-- quake/fight.qc | 2 -- quake/items.qc | 10 ---------- quake/misc.qc | 1 - quake/monsters.qc | 4 ---- quake/ogre.qc | 2 +- quake/plats.qc | 2 -- quake/triggers.qc | 2 -- quake/weapons.qc | 10 +++------- quake/world.qc | 2 -- quake/zombie.qc | 2 +- 16 files changed, 8 insertions(+), 57 deletions(-) diff --git a/quake/ai.qc b/quake/ai.qc index 80ab6c1..f0c4cbe 100644 --- a/quake/ai.qc +++ b/quake/ai.qc @@ -473,8 +473,6 @@ The monster is walking it's beat */ void(float dist) ai_walk = { - local vector mtemp; - movedist = dist; if (self.classname == "monster_dragon") @@ -676,10 +674,6 @@ The monster has an enemy it is trying to kill */ void(float dist) ai_run = { - local vector delta; - local float axis; - local float direct, ang_rint, ang_floor, ang_ceil; - movedist = dist; // see if the enemy is dead if (self.enemy.health <= 0) diff --git a/quake/buttons.qc b/quake/buttons.qc index 016ce6e..1df47c9 100644 --- a/quake/buttons.qc +++ b/quake/buttons.qc @@ -85,8 +85,6 @@ When a button is touched, it moves some distance in the direction of it's angle, */ void() func_button = { -local float gtemp, ftemp; - if (self.sounds == 0) { precache_sound ("buttons/airbut1.wav"); diff --git a/quake/client.qc b/quake/client.qc index d4ac8c2..949b5bf 100644 --- a/quake/client.qc +++ b/quake/client.qc @@ -289,8 +289,6 @@ void() execute_changelevel = void() changelevel_touch = { - local entity pos; - if (other.classname != "player") return; @@ -691,7 +689,6 @@ void() CheckRules = void() PlayerDeathThink = { - local entity old_self; local float forward; if ((self.flags & FL_ONGROUND)) @@ -726,8 +723,6 @@ void() PlayerDeathThink = void() PlayerJump = { - local vector start, end; - if (self.flags & FL_WATERJUMP) return; @@ -898,9 +893,6 @@ Called every frame before physics are run */ void() PlayerPreThink = { - local float mspeed, aspeed; - local float r; - if (intermission_running) { IntermissionThink (); // otherwise a button could be missed between @@ -1110,9 +1102,6 @@ Called every frame after physics are run */ void() PlayerPostThink = { - local float mspeed, aspeed; - local float r; - if (self.view_ofs == '0 0 0') return; // intermission or finale if (self.deadflag) diff --git a/quake/demon.qc b/quake/demon.qc index e4deea0..6abcdc4 100644 --- a/quake/demon.qc +++ b/quake/demon.qc @@ -277,8 +277,6 @@ float() CheckDemonJump = float() DemonCheckAttack = { - local vector vec; - // if close enough for slashing, go for it if (CheckDemonMelee ()) { diff --git a/quake/dog.qc b/quake/dog.qc index bc46fe0..03f6333 100644 --- a/quake/dog.qc +++ b/quake/dog.qc @@ -303,8 +303,6 @@ float() CheckDogJump = float() DogCheckAttack = { - local vector vec; - // if close enough for slashing, go for it if (CheckDogMelee ()) { diff --git a/quake/enforcer.qc b/quake/enforcer.qc index 29216f0..9f99f54 100644 --- a/quake/enforcer.qc +++ b/quake/enforcer.qc @@ -74,7 +74,7 @@ void() Laser_Touch = void(vector org, vector vec) LaunchLaser = { local vector vec; - + if (self.classname == "monster_enforcer") sound (self, CHAN_WEAPON, "enforcer/enfire.wav", 1, ATTN_NORM); @@ -97,6 +97,7 @@ void(vector org, vector vec) LaunchLaser = newmis.nextthink = time + 5; newmis.think = SUB_Remove; newmis.touch = Laser_Touch; +traceoff(); }; @@ -109,7 +110,7 @@ void() enforcer_fire = makevectors (self.angles); org = self.origin + v_forward * 30 + v_right * 8.5 + '0 0 16'; - +traceon(); LaunchLaser(org, self.enemy.origin - self.origin); }; diff --git a/quake/fight.qc b/quake/fight.qc index a8999a4..65966cd 100644 --- a/quake/fight.qc +++ b/quake/fight.qc @@ -295,8 +295,6 @@ float() ShamCheckAttack = { local vector spot1, spot2; local entity targ; - local float chance; - local float enemy_yaw; if (enemy_range == RANGE_MELEE) { diff --git a/quake/items.qc b/quake/items.qc index fcf9d85..00e7039 100644 --- a/quake/items.qc +++ b/quake/items.qc @@ -149,7 +149,6 @@ void() item_health = void() health_touch = { - local float amount; local string s; if (other.classname != "player") @@ -868,9 +867,6 @@ KEYS void() key_touch = { -local entity stemp; -local float best; - if (other.classname != "player") return; if (other.health <= 0) @@ -1004,9 +1000,6 @@ END OF LEVEL RUNES void() sigil_touch = { -local entity stemp; -local float best; - if (other.classname != "player") return; if (other.health <= 0) @@ -1077,9 +1070,6 @@ void() powerup_touch; void() powerup_touch = { -local entity stemp; -local float best; - if (other.classname != "player") return; if (other.health <= 0) diff --git a/quake/misc.qc b/quake/misc.qc index 7d05d15..82781e4 100644 --- a/quake/misc.qc +++ b/quake/misc.qc @@ -444,7 +444,6 @@ void() bubble_remove = void() bubble_bob = { local float rnd1, rnd2, rnd3; -local vector vtmp1, modi; self.cnt = self.cnt + 1; if (self.cnt == 4) diff --git a/quake/monsters.qc b/quake/monsters.qc index c137d17..d83f061 100644 --- a/quake/monsters.qc +++ b/quake/monsters.qc @@ -48,8 +48,6 @@ enemy as activator. */ void() monster_death_use = { - local entity ent, otemp, stemp; - // fall to ground if (self.flags & FL_FLY) self.flags = self.flags - FL_FLY; @@ -68,8 +66,6 @@ void() monster_death_use = void() walkmonster_start_go = { -local string stemp; -local entity etemp; self.origin_z = self.origin_z + 1; // raise off floor a bit droptofloor(); diff --git a/quake/ogre.qc b/quake/ogre.qc index 32dd78d..b7ba75c 100644 --- a/quake/ogre.qc +++ b/quake/ogre.qc @@ -89,7 +89,7 @@ OgreFireGrenade */ void() OgreFireGrenade = { - local entity missile, mpuff; + local entity missile; self.effects = self.effects | EF_MUZZLEFLASH; diff --git a/quake/plats.qc b/quake/plats.qc index 8a8397a..d3fa814 100644 --- a/quake/plats.qc +++ b/quake/plats.qc @@ -147,8 +147,6 @@ Set "sounds" to one of the following: void() func_plat = { -local entity t; - if (!self.t_length) self.t_length = 80; if (!self.t_width) diff --git a/quake/triggers.qc b/quake/triggers.qc index 46824f2..f32d4e6 100644 --- a/quake/triggers.qc +++ b/quake/triggers.qc @@ -221,8 +221,6 @@ void() trigger_secret = void() counter_use = { - local string junk; - self.count = self.count - 1; if (self.count < 0) return; diff --git a/quake/weapons.qc b/quake/weapons.qc index 1e72540..9af1833 100644 --- a/quake/weapons.qc +++ b/quake/weapons.qc @@ -88,7 +88,7 @@ SpawnMeatSpray */ void(vector org, vector vel) SpawnMeatSpray = { - local entity missile, mpuff; + local entity missile; local vector org; missile = spawn (); @@ -373,7 +373,7 @@ W_FireRocket */ void() W_FireRocket = { - local entity missile, mpuff; + local entity missile; self.currentammo = self.ammo_rockets = self.ammo_rockets - 1; @@ -548,7 +548,7 @@ W_FireGrenade */ void() W_FireGrenade = { - local entity missile, mpuff; + local entity missile; self.currentammo = self.ammo_rockets = self.ammo_rockets - 1; @@ -627,7 +627,6 @@ void(vector org, vector dir) launch_spike = void() W_FireSuperSpikes = { local vector dir; - local entity old; sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM); self.attack_finished = time + 0.2; @@ -643,7 +642,6 @@ void() W_FireSuperSpikes = void(float ox) W_FireSpikes = { local vector dir; - local entity old; makevectors (self.v_angle); @@ -674,7 +672,6 @@ void(float ox) W_FireSpikes = .float hit_z; void() spike_touch = { -local float rand; if (other == self.owner) return; @@ -714,7 +711,6 @@ local float rand; void() superspike_touch = { -local float rand; if (other == self.owner) return; diff --git a/quake/world.qc b/quake/world.qc index 5256cad..00d1ebd 100644 --- a/quake/world.qc +++ b/quake/world.qc @@ -359,8 +359,6 @@ void() bodyque = void() InitBodyQue = { - local entity e; - bodyque_head = spawn(); bodyque_head.classname = "bodyque"; bodyque_head.owner = spawn(); diff --git a/quake/zombie.qc b/quake/zombie.qc index 8065989..62d5ec8 100644 --- a/quake/zombie.qc +++ b/quake/zombie.qc @@ -161,7 +161,7 @@ ZombieFireGrenade */ void(vector st) ZombieFireGrenade = { - local entity missile, mpuff; + local entity missile; local vector org; sound (self, CHAN_WEAPON, "zombie/z_shot1.wav", 1, ATTN_NORM);