From 0490dbc283ab64cee9424bbe2aa1b4375aa0b53b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 19 Feb 2002 05:16:48 +0000 Subject: [PATCH] cleanup all the warnings --- quake/ai.qc | 4 ++-- quake/client.qc | 2 +- quake/defs.qc | 2 +- quake/dog.qc | 2 +- quake/doors.qc | 11 ++++++++--- quake/items.qc | 4 ++-- quake/misc.qc | 4 ++-- quake/ogre.qc | 2 +- quake/oldone.qc | 2 +- quake/player.qc | 2 +- quake/shalrath.qc | 4 ++-- quake/weapons.qc | 2 +- 12 files changed, 23 insertions(+), 18 deletions(-) diff --git a/quake/ai.qc b/quake/ai.qc index f0c4cbe..5d4761d 100644 --- a/quake/ai.qc +++ b/quake/ai.qc @@ -364,7 +364,7 @@ float() FindTarget = { client = sight_entity; if (client.enemy == self.enemy) - return; + return 0; } else { @@ -582,7 +582,7 @@ float() DogCheckAttack; float() CheckAnyAttack = { if (!enemy_vis) - return; + return 0; if (self.classname == "monster_army") return SoldierCheckAttack (); if (self.classname == "monster_ogre") diff --git a/quake/client.qc b/quake/client.qc index 949b5bf..d5bac9a 100644 --- a/quake/client.qc +++ b/quake/client.qc @@ -2,7 +2,7 @@ // prototypes void () W_WeaponFrame; void() W_SetCurrentAmmo; -void() player_pain; +void(entity attacker, float damage) player_pain; void() player_stand1; void (vector org) spawn_tfog; void (vector org, entity death_owner) spawn_tdeath; diff --git a/quake/defs.qc b/quake/defs.qc index 4c27cb0..d552138 100644 --- a/quake/defs.qc +++ b/quake/defs.qc @@ -599,7 +599,7 @@ void() traceoff = #30; void(entity e) eprint = #31; // prints an entire edict float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE // #33 was removed -float(float yaw, float dist) droptofloor= #34; // TRUE if landed on floor +float() droptofloor = #34; // TRUE if landed on floor void(float style, string value) lightstyle = #35; float(float v) rint = #36; // round to nearest int float(float v) floor = #37; // largest integer <= v diff --git a/quake/dog.qc b/quake/dog.qc index 03f6333..b28bebe 100644 --- a/quake/dog.qc +++ b/quake/dog.qc @@ -195,7 +195,7 @@ void() dog_painb14 =[ $painb14 , dog_painb15 ] {}; void() dog_painb15 =[ $painb15 , dog_painb16 ] {}; void() dog_painb16 =[ $painb16 , dog_run1 ] {}; -void() dog_pain = +void(entity attacker, float damage) dog_pain = { sound (self, CHAN_VOICE, "dog/dpain1.wav", 1, ATTN_NORM); diff --git a/quake/doors.qc b/quake/doors.qc index 5a85ca8..eb9300a 100644 --- a/quake/doors.qc +++ b/quake/doors.qc @@ -578,7 +578,7 @@ void () fd_secret_use = if (!(self.spawnflags & SECRET_NO_SHOOT)) { - self.th_pain = SUB_Null; + //XXX not needed? self.th_pain = SUB_Null; self.takedamage = DAMAGE_NO; } self.velocity = '0 0 0'; @@ -612,6 +612,11 @@ void () fd_secret_use = sound(self, CHAN_VOICE, self.noise2, 1, ATTN_NORM); }; +void (entity attacker, float damage) fd_secret_pain = +{ + fd_secret_use (); +}; + // Wait after first movement... void () fd_secret_move1 = { @@ -665,7 +670,7 @@ void () fd_secret_done = { self.health = 10000; self.takedamage = DAMAGE_YES; - self.th_pain = fd_secret_use; + self.th_pain = fd_secret_pain; } sound(self, CHAN_VOICE, self.noise3, 1, ATTN_NORM); }; @@ -769,7 +774,7 @@ void () func_door_secret = { self.health = 10000; self.takedamage = DAMAGE_YES; - self.th_pain = fd_secret_use; + self.th_pain = fd_secret_pain; self.th_die = fd_secret_use; } self.oldorigin = self.origin; diff --git a/quake/items.qc b/quake/items.qc index 00e7039..5c9c6e3 100644 --- a/quake/items.qc +++ b/quake/items.qc @@ -236,7 +236,7 @@ void() armor_touch; void() armor_touch = { - local float type, value, bit; + local float type = 0, value = 0, bit = 0; if (other.health <= 0) return; @@ -390,7 +390,7 @@ float() W_BestWeapon; void() weapon_touch = { - local float hadammo, best, new, old; + local float hadammo, best, new = 0, old; local entity stemp; local float leave; diff --git a/quake/misc.qc b/quake/misc.qc index 82781e4..dabd82d 100644 --- a/quake/misc.qc +++ b/quake/misc.qc @@ -176,7 +176,7 @@ void() misc_fireball = self.nextthink = time + (random() * 5); self.think = fire_fly; if (!self.speed) - self.speed == 1000; + self.speed = 1000; }; void() fire_fly = @@ -532,7 +532,7 @@ void() func_illusionary = self.movetype = MOVETYPE_NONE; self.solid = SOLID_NOT; setmodel (self, self.model); - makestatic (); + makestatic (self); }; /*QUAKED func_episodegate (0 .5 .8) ? E1 E2 E3 E4 diff --git a/quake/ogre.qc b/quake/ogre.qc index b7ba75c..8fc4a62 100644 --- a/quake/ogre.qc +++ b/quake/ogre.qc @@ -246,7 +246,7 @@ void() ogre_smash9 =[ $smash9, ogre_smash10 ] {ai_charge(13); chainsaw(0);}; void() ogre_smash10 =[ $smash10, ogre_smash11 ] {chainsaw(1);}; void() ogre_smash11 =[ $smash11, ogre_smash12 ] {ai_charge(2); chainsaw(0); self.nextthink = self.nextthink + random()*0.2;}; // slight variation -void() ogre_smash12 =[ $smash12, ogre_smash13 ] {ai_charge();}; +void() ogre_smash12 =[ $smash12, ogre_smash13 ] {ai_charge(0);};//XXX was () but that's incorrect void() ogre_smash13 =[ $smash13, ogre_smash14 ] {ai_charge(4);}; void() ogre_smash14 =[ $smash14, ogre_run1 ] {ai_charge(12);}; diff --git a/quake/oldone.qc b/quake/oldone.qc index 103d6fb..b7fcf46 100644 --- a/quake/oldone.qc +++ b/quake/oldone.qc @@ -239,7 +239,7 @@ void() finale_4 = //============================================================================ -void () nopain = +void (entity attacker, float damage) nopain = { self.health = 40000; }; diff --git a/quake/player.qc b/quake/player.qc index 46098e9..863c425 100644 --- a/quake/player.qc +++ b/quake/player.qc @@ -334,7 +334,7 @@ void() player_axpain4 = [ $axpain4, player_axpain5 ] {}; void() player_axpain5 = [ $axpain5, player_axpain6 ] {}; void() player_axpain6 = [ $axpain6, player_run ] {}; -void() player_pain = +void(entity attacker, float damage) player_pain = { if (self.weaponframe) return; diff --git a/quake/shalrath.qc b/quake/shalrath.qc index adf821a..9d97707 100644 --- a/quake/shalrath.qc +++ b/quake/shalrath.qc @@ -21,7 +21,7 @@ $frame death1 death2 death3 death4 death5 death6 death7 $frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8 walk9 walk10 $frame walk11 walk12 -void() shalrath_pain; +void(entity attacker, float damage) shalrath_pain; void() ShalMissile; void() shal_stand =[ $walk1, shal_stand ] {ai_stand();}; @@ -87,7 +87,7 @@ void() shal_death6 =[ $death6, shal_death7 ] {}; void() shal_death7 =[ $death7, shal_death7 ] {}; -void() shalrath_pain = +void(entity attacker, float damage) shalrath_pain = { if (self.pain_finished > time) return; diff --git a/quake/weapons.qc b/quake/weapons.qc index 13fd37f..bef4e12 100644 --- a/quake/weapons.qc +++ b/quake/weapons.qc @@ -942,7 +942,7 @@ W_ChangeWeapon */ void() W_ChangeWeapon = { - local float it, am, fl; + local float it, am, fl = 0; it = self.items; am = 0;