- METHOD(Seeker, wr_aim, void(entity thiswep))
- {
- if(WEP_CVAR(seeker, type) == 1)
- if(W_Seeker_Tagged_Info(self, self.enemy) != world)
- self.BUTTON_ATCK = bot_aim(WEP_CVAR(seeker, missile_speed_max), 0, WEP_CVAR(seeker, missile_lifetime), false);
- else
- self.BUTTON_ATCK2 = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false);
- else
- self.BUTTON_ATCK = bot_aim(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))
- {
- if(autocvar_g_balance_seeker_reload_ammo && actor.clip_load < min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo))) { // forced reload
- thiswep.wr_reload(thiswep, actor, weaponentity);
- } else if(fire & 1)
- {
- if(WEP_CVAR(seeker, type) == 1)
- {
- if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, missile_refire)))
- {
- W_Seeker_Attack();
- weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, missile_animtime), w_ready);
- }
- }
- else
- {
- if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, tag_refire)))
- {
- W_Seeker_Fire_Tag(thiswep);
- weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, tag_animtime), w_ready);
- }
- }
- }
-
- else if(fire & 2)
- {
- if(WEP_CVAR(seeker, type) == 1)
- {
- if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, tag_refire)))
- {
- W_Seeker_Fire_Tag(thiswep);
- weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, tag_animtime), w_ready);
- }
- }
- else
- {
- if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, flac_refire)))
- {
- W_Seeker_Fire_Flac(thiswep);
- weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, flac_animtime), w_ready);
- }
- }
- }
- }
- METHOD(Seeker, wr_checkammo1, bool(entity thiswep))
- {
- float ammo_amount;
- if(WEP_CVAR(seeker, type) == 1)
- {
- ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, missile_ammo);
- ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, missile_ammo);
- }
- else
- {
- ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, tag_ammo);
- ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, tag_ammo);
- }
- return ammo_amount;
- }
- METHOD(Seeker, wr_checkammo2, bool(entity thiswep))
- {
- float ammo_amount;
- if(WEP_CVAR(seeker, type) == 1)
- {
- ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, tag_ammo);
- ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, tag_ammo);
- }
- else
- {
- ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, flac_ammo);
- ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, flac_ammo);
- }
- return ammo_amount;
- }
- 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));
- }
- METHOD(Seeker, wr_suicidemessage, int(entity thiswep))
- {
- return WEAPON_SEEKER_SUICIDE;
- }
- METHOD(Seeker, wr_killmessage, int(entity thiswep))
- {
- if(w_deathtype & HITTYPE_SECONDARY)
- return WEAPON_SEEKER_MURDER_TAG;
- else
- return WEAPON_SEEKER_MURDER_SPRAY;
- }
+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(self, WEP_CVAR(seeker, missile_speed_max), 0, WEP_CVAR(seeker, missile_lifetime), false);
+ else
+ 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(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))
+{
+ if(autocvar_g_balance_seeker_reload_ammo && actor.clip_load < min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo))) { // forced reload
+ thiswep.wr_reload(thiswep, actor, weaponentity);
+ } else if(fire & 1)
+ {
+ if(WEP_CVAR(seeker, type) == 1)
+ {
+ if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, missile_refire)))
+ {
+ W_Seeker_Attack();
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, missile_animtime), w_ready);
+ }
+ }
+ else
+ {
+ if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, tag_refire)))
+ {
+ W_Seeker_Fire_Tag(thiswep);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, tag_animtime), w_ready);
+ }
+ }
+ }
+
+ else if(fire & 2)
+ {
+ if(WEP_CVAR(seeker, type) == 1)
+ {
+ if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, tag_refire)))
+ {
+ W_Seeker_Fire_Tag(thiswep);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, tag_animtime), w_ready);
+ }
+ }
+ else
+ {
+ if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, flac_refire)))
+ {
+ W_Seeker_Fire_Flac(thiswep);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, flac_animtime), w_ready);
+ }
+ }
+ }
+}
+METHOD(Seeker, wr_checkammo1, bool(entity thiswep))
+{
+ SELFPARAM();
+ float ammo_amount;
+ if(WEP_CVAR(seeker, type) == 1)
+ {
+ ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, missile_ammo);
+ ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, missile_ammo);
+ }
+ else
+ {
+ ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, tag_ammo);
+ ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, tag_ammo);
+ }
+ return ammo_amount;
+}
+METHOD(Seeker, wr_checkammo2, bool(entity thiswep))
+{
+ SELFPARAM();
+ float ammo_amount;
+ if(WEP_CVAR(seeker, type) == 1)
+ {
+ ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, tag_ammo);
+ ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, tag_ammo);
+ }
+ else
+ {
+ ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, flac_ammo);
+ ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, flac_ammo);
+ }
+ return ammo_amount;
+}
+METHOD(Seeker, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
+{
+ SELFPARAM();
+ W_Reload(self, min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), SND_RELOAD);
+}
+METHOD(Seeker, wr_suicidemessage, Notification(entity thiswep))
+{
+ return WEAPON_SEEKER_SUICIDE;
+}
+METHOD(Seeker, wr_killmessage, Notification(entity thiswep))
+{
+ if(w_deathtype & HITTYPE_SECONDARY)
+ return WEAPON_SEEKER_MURDER_TAG;
+ else
+ return WEAPON_SEEKER_MURDER_SPRAY;
+}