X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fseeker.qc;h=34b6e895f3af59977f130f90b9cd8ec3f83fcc90;hb=3cfb64730d883ae9ccf0315f365da19345270890;hp=ac71e48a92ea3fa0fbb369eea0f5622c14eead29;hpb=2a19e375a2fdf01a5b0337f2029e7a46019ccc64;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/seeker.qc b/qcsrc/common/weapons/weapon/seeker.qc index ac71e48a9..34b6e895f 100644 --- a/qcsrc/common/weapons/weapon/seeker.qc +++ b/qcsrc/common/weapons/weapon/seeker.qc @@ -220,7 +220,7 @@ void W_Seeker_Missile_Damage(entity this, entity inflictor, entity attacker, flo this.health = this.health - damage; if(this.health <= 0) - WITH(entity, self, this, W_PrepareExplosionByDamage(attacker, W_Seeker_Missile_Explode)); + WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_Seeker_Missile_Explode)); } /* @@ -255,7 +255,7 @@ void W_Seeker_Fire_Missile(Weapon thiswep, vector f_diff, entity m_target) W_DecreaseAmmo(thiswep, self, WEP_CVAR(seeker, missile_ammo)); makevectors(self.v_angle); - W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND(SEEKER_FIRE), CH_WEAPON_A, 0); + W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND_SEEKER_FIRE, CH_WEAPON_A, 0); w_shotorg += f_diff; Send_Effect(EFFECT_SEEKER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); @@ -345,7 +345,7 @@ void W_Seeker_Fire_Flac(Weapon thiswep) f_diff = '+1.25 +3.75 0'; break; } - W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND(FLAC_FIRE), CH_WEAPON_A, WEP_CVAR(seeker, flac_damage)); + W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, flac_damage)); w_shotorg += f_diff; Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); @@ -562,7 +562,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep) entity missile; W_DecreaseAmmo(thiswep, self, WEP_CVAR(seeker, tag_ammo)); - W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND(TAG_FIRE), CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count)); + W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND_TAG_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count)); missile = new(seeker_tag); missile.owner = missile.realowner = self; @@ -600,13 +600,14 @@ void W_Seeker_Fire_Tag(Weapon thiswep) METHOD(Seeker, wr_aim, void(entity thiswep)) { + SELFPARAM(); if(WEP_CVAR(seeker, type) == 1) if(W_Seeker_Tagged_Info(self, self.enemy) != world) - PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(WEP_CVAR(seeker, missile_speed_max), 0, WEP_CVAR(seeker, missile_lifetime), false); + PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(self, WEP_CVAR(seeker, missile_speed_max), 0, WEP_CVAR(seeker, missile_lifetime), false); else - PHYS_INPUT_BUTTON_ATCK2(self) = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false); + PHYS_INPUT_BUTTON_ATCK2(self) = bot_aim(self, WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false); else - PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false); + PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(self, WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false); } METHOD(Seeker, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { @@ -654,6 +655,7 @@ METHOD(Seeker, wr_think, void(entity thiswep, entity actor, .entity weaponentity } METHOD(Seeker, wr_checkammo1, bool(entity thiswep)) { + SELFPARAM(); float ammo_amount; if(WEP_CVAR(seeker, type) == 1) { @@ -669,6 +671,7 @@ METHOD(Seeker, wr_checkammo1, bool(entity thiswep)) } METHOD(Seeker, wr_checkammo2, bool(entity thiswep)) { + SELFPARAM(); float ammo_amount; if(WEP_CVAR(seeker, type) == 1) { @@ -684,13 +687,14 @@ METHOD(Seeker, wr_checkammo2, bool(entity thiswep)) } METHOD(Seeker, wr_reload, void(entity thiswep, entity actor, .entity weaponentity)) { - W_Reload(self, min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), SND(RELOAD)); + SELFPARAM(); + W_Reload(self, min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), SND_RELOAD); } -METHOD(Seeker, wr_suicidemessage, int(entity thiswep)) +METHOD(Seeker, wr_suicidemessage, Notification(entity thiswep)) { return WEAPON_SEEKER_SUICIDE; } -METHOD(Seeker, wr_killmessage, int(entity thiswep)) +METHOD(Seeker, wr_killmessage, Notification(entity thiswep)) { if(w_deathtype & HITTYPE_SECONDARY) return WEAPON_SEEKER_MURDER_TAG; @@ -703,6 +707,7 @@ METHOD(Seeker, wr_killmessage, int(entity thiswep)) METHOD(Seeker, wr_impacteffect, void(entity thiswep)) { + SELFPARAM(); vector org2; org2 = w_org + w_backoff * 6; if(w_deathtype & HITTYPE_BOUNCE)