#endif
}
+#include "../../weapons/all.qh"
+
CLASS(MageSpike, PortoLaunch)
/* flags */ ATTRIB(MageSpike, spawnflags, int, WEP_TYPE_OTHER);
-/* impulse */ ATTRIB(MageSpike, impulse, int, 5);
+/* impulse */ ATTRIB(MageSpike, impulse, int, 9);
/* refname */ ATTRIB(MageSpike, netname, string, "magespike");
/* wepname */ ATTRIB(MageSpike, message, string, _("Mage spike"));
ENDCLASS(MageSpike)
);
#else
+#include "../../weapons/all.qh"
+
CLASS(PlasmaDualAttack, PortoLaunch)
/* flags */ ATTRIB(PlasmaDualAttack, spawnflags, int, WEP_TYPE_OTHER);
/* impulse */ ATTRIB(PlasmaDualAttack, impulse, int, 5);
SELFPARAM();
if (self.BUTTON_ATCK)
if (weapon_prepareattack(0, WEP_CVAR_PRI(electro, refire))) {
- if (!self.target_range) self.target_range = autocvar_g_monsters_target_range;
W_SetupShot_Dir(self, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0);
self.tur_shotdir_updated = w_shotdir;
self.tur_shotorg = w_shotorg;
#ifndef VEHICLE_RACER
#define VEHICLE_RACER
+
#ifndef MENUQC
int v_racer(int);
#endif
this.vehicle_func = v_racer;
#endif
}
+
+#include "../../weapons/all.qh"
+
+CLASS(RacerAttack, PortoLaunch)
+/* flags */ ATTRIB(RacerAttack, spawnflags, int, WEP_TYPE_OTHER);
+/* impulse */ ATTRIB(RacerAttack, impulse, int, 3);
+/* refname */ ATTRIB(RacerAttack, netname, string, "racercannon");
+/* wepname */ ATTRIB(RacerAttack, message, string, _("Racer cannon"));
+ENDCLASS(RacerAttack)
+REGISTER_WEAPON(RACER, NEW(RacerAttack)) {
+ localcmd(sprintf("alias weapon_%s \"impulse %d\"\n", this.netname, 230 + this.m_id - 1));
+}
+
#endif
#ifdef IMPLEMENTATION
#include "../../effects/effects.qh"
#include "../../triggers/trigger/impulse.qh"
+void racer_fire_cannon(string tagname);
+METHOD(RacerAttack, wr_think, bool(entity thiswep)) {
+ SELFPARAM();
+ if (self.BUTTON_ATCK)
+ if (weapon_prepareattack(0, 0)) {
+ W_SetupShot_Dir(self, v_forward, false, 0, W_Sound("lasergun_fire"), CH_WEAPON_B, 0);
+ racer_fire_cannon("tag_fire1");
+ weapon_thinkf(WFRAME_FIRE1, WEP_CVAR(machinegun, sustained_refire), w_ready);
+ }
+ return true;
+}
+
bool autocvar_g_vehicle_racer;
float autocvar_g_vehicle_racer_speed_afterburn;