// IF YOU DISREGARD THIS NOTICE, I'LL KILL YOU WITH THE @!#%'N TUBA
// core weapons
-#include "weapon/blaster.qc"
-#include "weapon/shotgun.qc"
-#include "weapon/machinegun.qc"
-#include "weapon/mortar.qc"
-#include "weapon/minelayer.qc"
-#include "weapon/electro.qc"
-#include "weapon/crylink.qc"
-#include "weapon/vortex.qc"
-#include "weapon/hagar.qc"
-#include "weapon/devastator.qc"
+#include "weapon/blaster.qh"
+#include "weapon/shotgun.qh"
+#include "weapon/machinegun.qh"
+#include "weapon/mortar.qh"
+#include "weapon/minelayer.qh"
+#include "weapon/electro.qh"
+#include "weapon/crylink.qh"
+#include "weapon/vortex.qh"
+#include "weapon/hagar.qh"
+#include "weapon/devastator.qh"
// other weapons
-#include "weapon/porto.qc"
-#include "weapon/vaporizer.qc"
-#include "weapon/hook.qc"
-#include "weapon/hlac.qc"
-#include "weapon/tuba.qc"
-#include "weapon/rifle.qc"
-#include "weapon/fireball.qc"
-#include "weapon/seeker.qc"
-#include "weapon/shockwave.qc"
-#include "weapon/arc.qc"
+#include "weapon/porto.qh"
+#include "weapon/vaporizer.qh"
+#include "weapon/hook.qh"
+#include "weapon/hlac.qh"
+#include "weapon/tuba.qh"
+#include "weapon/rifle.qh"
+#include "weapon/fireball.qh"
+#include "weapon/seeker.qh"
+#include "weapon/shockwave.qh"
+#include "weapon/arc.qh"
#ifdef SVQC
#include "config.qc"
#endif
-#define IMPLEMENTATION
-#include "all.inc"
-#undef IMPLEMENTATION
+
+#include "weapon/_mod.inc"
+
// WEAPON PLUGIN SYSTEM
#include "arc.qh"
-#ifndef IMPLEMENTATION
-CLASS(Arc, Weapon)
-/* ammotype */ ATTRIB(Arc, ammo_field, .int, ammo_cells);
-/* impulse */ ATTRIB(Arc, impulse, int, 3);
-/* flags */ ATTRIB(Arc, spawnflags, int, WEP_TYPE_HITSCAN);
-/* rating */ ATTRIB(Arc, bot_pickupbasevalue, float, 8000);
-/* color */ ATTRIB(Arc, wpcolor, vector, '1 1 1');
-/* modelname */ ATTRIB(Arc, mdl, string, "arc");
-#ifdef GAMEQC
-/* model */ ATTRIB(Arc, m_model, Model, MDL_ARC_ITEM);
-#endif
-/* crosshair */ ATTRIB(Arc, w_crosshair, string, "gfx/crosshairhlac");
-/* crosshair */ ATTRIB(Arc, w_crosshair_size, float, 0.7);
-/* wepimg */ ATTRIB(Arc, model2, string, "weaponarc");
-/* refname */ ATTRIB(Arc, netname, string, "arc");
-/* wepname */ ATTRIB(Arc, m_name, string, _("Arc"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, bolt, float, NONE) \
- P(class, prefix, bolt_ammo, float, NONE) \
- P(class, prefix, bolt_damageforcescale, float, NONE) \
- P(class, prefix, bolt_damage, float, NONE) \
- P(class, prefix, bolt_edgedamage, float, NONE) \
- P(class, prefix, bolt_force, float, NONE) \
- P(class, prefix, bolt_health, float, NONE) \
- P(class, prefix, bolt_lifetime, float, NONE) \
- P(class, prefix, bolt_radius, float, NONE) \
- P(class, prefix, bolt_refire, float, NONE) \
- P(class, prefix, bolt_speed, float, NONE) \
- P(class, prefix, bolt_spread, float, NONE) \
- P(class, prefix, beam_ammo, float, NONE) \
- P(class, prefix, beam_animtime, float, NONE) \
- P(class, prefix, beam_botaimlifetime, float, NONE) \
- P(class, prefix, beam_botaimspeed, float, NONE) \
- P(class, prefix, beam_damage, float, NONE) \
- P(class, prefix, beam_degreespersegment, float, NONE) \
- P(class, prefix, beam_distancepersegment, float, NONE) \
- P(class, prefix, beam_falloff_halflifedist, float, NONE) \
- P(class, prefix, beam_falloff_maxdist, float, NONE) \
- P(class, prefix, beam_falloff_mindist, float, NONE) \
- P(class, prefix, beam_force, float, NONE) \
- P(class, prefix, beam_healing_amax, float, NONE) \
- P(class, prefix, beam_healing_aps, float, NONE) \
- P(class, prefix, beam_healing_hmax, float, NONE) \
- P(class, prefix, beam_healing_hps, float, NONE) \
- P(class, prefix, beam_heat, float, NONE) /* heat increase per second (primary) */ \
- P(class, prefix, beam_maxangle, float, NONE) \
- P(class, prefix, beam_nonplayerdamage, float, NONE) \
- P(class, prefix, beam_range, float, NONE) \
- P(class, prefix, beam_refire, float, NONE) \
- P(class, prefix, beam_returnspeed, float, NONE) \
- P(class, prefix, beam_tightness, float, NONE) \
- P(class, prefix, burst_ammo, float, NONE) \
- P(class, prefix, burst_damage, float, NONE) \
- P(class, prefix, burst_healing_aps, float, NONE) \
- P(class, prefix, burst_healing_hps, float, NONE) \
- P(class, prefix, burst_heat, float, NONE) /* heat increase per second (secondary) */ \
- P(class, prefix, cooldown, float, NONE) /* heat decrease per second when resting */ \
- P(class, prefix, cooldown_release, float, NONE) /* delay weapon re-use when releasing button */ \
- P(class, prefix, overheat_max, float, NONE) /* maximum heat before jamming */ \
- P(class, prefix, overheat_min, float, NONE) /* minimum heat to wait for cooldown */ \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Arc, arc)
-#undef X
-
-ENDCLASS(Arc)
-REGISTER_WEAPON(ARC, arc, NEW(Arc));
-
-
-#ifdef GAMEQC
-const float ARC_MAX_SEGMENTS = 20;
-vector arc_shotorigin[4];
-.vector beam_start;
-.vector beam_dir;
-.vector beam_wantdir;
-.int beam_type;
-
-const int ARC_BT_MISS = 0x00;
-const int ARC_BT_WALL = 0x01;
-const int ARC_BT_HEAL = 0x02;
-const int ARC_BT_HIT = 0x03;
-const int ARC_BT_BURST_MISS = 0x10;
-const int ARC_BT_BURST_WALL = 0x11;
-const int ARC_BT_BURST_HEAL = 0x12;
-const int ARC_BT_BURST_HIT = 0x13;
-const int ARC_BT_BURSTMASK = 0x10;
-
-const int ARC_SF_SETTINGS = BIT(0);
-const int ARC_SF_START = BIT(1);
-const int ARC_SF_WANTDIR = BIT(2);
-const int ARC_SF_BEAMDIR = BIT(3);
-const int ARC_SF_BEAMTYPE = BIT(4);
-const int ARC_SF_LOCALMASK = ARC_SF_START | ARC_SF_WANTDIR | ARC_SF_BEAMDIR;
-#endif
-#ifdef SVQC
-.entity arc_beam;
-.bool arc_BUTTON_ATCK_prev; // for better animation control
-.float beam_prev;
-.float beam_initialized;
-.float beam_bursting;
-.float beam_teleporttime;
-.float beam_heat; // (beam) amount of heat produced
-.float arc_overheat; // (dropped arc/player) time during which it's too hot
-.float arc_cooldown; // (dropped arc/player) cooling speed
-.float arc_heat_percent = _STAT(ARC_HEAT);
-.float arc_smoke_sound;
-#endif
-#ifdef CSQC
-.vector beam_color;
-.float beam_alpha;
-.float beam_thickness;
-.entity beam_traileffect;
-.entity beam_hiteffect;
-.float beam_hitlight[4]; // 0: radius, 123: rgb
-.entity beam_muzzleeffect;
-.float beam_muzzlelight[4]; // 0: radius, 123: rgb
-.string beam_image;
-
-.entity beam_muzzleentity;
-
-.float beam_degreespersegment;
-.float beam_distancepersegment;
-.float beam_usevieworigin;
-.float beam_initialized;
-.float beam_maxangle;
-.float beam_range;
-.float beam_returnspeed;
-.float beam_tightness;
-.vector beam_shotorigin;
-
-entity Draw_ArcBeam_callback_entity;
-float Draw_ArcBeam_callback_last_thickness;
-vector Draw_ArcBeam_callback_last_top; // NOTE: in same coordinate system as player.
-vector Draw_ArcBeam_callback_last_bottom; // NOTE: in same coordinate system as player.
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_arc) { weapon_defaultspawnfunc(this, WEP_ARC); }
}
#endif
-#endif
#pragma once
+
+CLASS(Arc, Weapon)
+/* ammotype */ ATTRIB(Arc, ammo_field, .int, ammo_cells);
+/* impulse */ ATTRIB(Arc, impulse, int, 3);
+/* flags */ ATTRIB(Arc, spawnflags, int, WEP_TYPE_HITSCAN);
+/* rating */ ATTRIB(Arc, bot_pickupbasevalue, float, 8000);
+/* color */ ATTRIB(Arc, wpcolor, vector, '1 1 1');
+/* modelname */ ATTRIB(Arc, mdl, string, "arc");
+#ifdef GAMEQC
+/* model */ ATTRIB(Arc, m_model, Model, MDL_ARC_ITEM);
+#endif
+/* crosshair */ ATTRIB(Arc, w_crosshair, string, "gfx/crosshairhlac");
+/* crosshair */ ATTRIB(Arc, w_crosshair_size, float, 0.7);
+/* wepimg */ ATTRIB(Arc, model2, string, "weaponarc");
+/* refname */ ATTRIB(Arc, netname, string, "arc");
+/* wepname */ ATTRIB(Arc, m_name, string, _("Arc"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, bolt, float, NONE) \
+ P(class, prefix, bolt_ammo, float, NONE) \
+ P(class, prefix, bolt_damageforcescale, float, NONE) \
+ P(class, prefix, bolt_damage, float, NONE) \
+ P(class, prefix, bolt_edgedamage, float, NONE) \
+ P(class, prefix, bolt_force, float, NONE) \
+ P(class, prefix, bolt_health, float, NONE) \
+ P(class, prefix, bolt_lifetime, float, NONE) \
+ P(class, prefix, bolt_radius, float, NONE) \
+ P(class, prefix, bolt_refire, float, NONE) \
+ P(class, prefix, bolt_speed, float, NONE) \
+ P(class, prefix, bolt_spread, float, NONE) \
+ P(class, prefix, beam_ammo, float, NONE) \
+ P(class, prefix, beam_animtime, float, NONE) \
+ P(class, prefix, beam_botaimlifetime, float, NONE) \
+ P(class, prefix, beam_botaimspeed, float, NONE) \
+ P(class, prefix, beam_damage, float, NONE) \
+ P(class, prefix, beam_degreespersegment, float, NONE) \
+ P(class, prefix, beam_distancepersegment, float, NONE) \
+ P(class, prefix, beam_falloff_halflifedist, float, NONE) \
+ P(class, prefix, beam_falloff_maxdist, float, NONE) \
+ P(class, prefix, beam_falloff_mindist, float, NONE) \
+ P(class, prefix, beam_force, float, NONE) \
+ P(class, prefix, beam_healing_amax, float, NONE) \
+ P(class, prefix, beam_healing_aps, float, NONE) \
+ P(class, prefix, beam_healing_hmax, float, NONE) \
+ P(class, prefix, beam_healing_hps, float, NONE) \
+ P(class, prefix, beam_heat, float, NONE) /* heat increase per second (primary) */ \
+ P(class, prefix, beam_maxangle, float, NONE) \
+ P(class, prefix, beam_nonplayerdamage, float, NONE) \
+ P(class, prefix, beam_range, float, NONE) \
+ P(class, prefix, beam_refire, float, NONE) \
+ P(class, prefix, beam_returnspeed, float, NONE) \
+ P(class, prefix, beam_tightness, float, NONE) \
+ P(class, prefix, burst_ammo, float, NONE) \
+ P(class, prefix, burst_damage, float, NONE) \
+ P(class, prefix, burst_healing_aps, float, NONE) \
+ P(class, prefix, burst_healing_hps, float, NONE) \
+ P(class, prefix, burst_heat, float, NONE) /* heat increase per second (secondary) */ \
+ P(class, prefix, cooldown, float, NONE) /* heat decrease per second when resting */ \
+ P(class, prefix, cooldown_release, float, NONE) /* delay weapon re-use when releasing button */ \
+ P(class, prefix, overheat_max, float, NONE) /* maximum heat before jamming */ \
+ P(class, prefix, overheat_min, float, NONE) /* minimum heat to wait for cooldown */ \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Arc, arc)
+#undef X
+
+ENDCLASS(Arc)
+REGISTER_WEAPON(ARC, arc, NEW(Arc));
+
+
+#ifdef GAMEQC
+const float ARC_MAX_SEGMENTS = 20;
+vector arc_shotorigin[4];
+.vector beam_start;
+.vector beam_dir;
+.vector beam_wantdir;
+.int beam_type;
+
+const int ARC_BT_MISS = 0x00;
+const int ARC_BT_WALL = 0x01;
+const int ARC_BT_HEAL = 0x02;
+const int ARC_BT_HIT = 0x03;
+const int ARC_BT_BURST_MISS = 0x10;
+const int ARC_BT_BURST_WALL = 0x11;
+const int ARC_BT_BURST_HEAL = 0x12;
+const int ARC_BT_BURST_HIT = 0x13;
+const int ARC_BT_BURSTMASK = 0x10;
+
+const int ARC_SF_SETTINGS = BIT(0);
+const int ARC_SF_START = BIT(1);
+const int ARC_SF_WANTDIR = BIT(2);
+const int ARC_SF_BEAMDIR = BIT(3);
+const int ARC_SF_BEAMTYPE = BIT(4);
+const int ARC_SF_LOCALMASK = ARC_SF_START | ARC_SF_WANTDIR | ARC_SF_BEAMDIR;
+#endif
+#ifdef SVQC
+.entity arc_beam;
+.bool arc_BUTTON_ATCK_prev; // for better animation control
+.float beam_prev;
+.float beam_initialized;
+.float beam_bursting;
+.float beam_teleporttime;
+.float beam_heat; // (beam) amount of heat produced
+.float arc_overheat; // (dropped arc/player) time during which it's too hot
+.float arc_cooldown; // (dropped arc/player) cooling speed
+.float arc_heat_percent = _STAT(ARC_HEAT);
+.float arc_smoke_sound;
+#endif
+#ifdef CSQC
+
+.vector beam_color;
+.float beam_alpha;
+.float beam_thickness;
+.entity beam_traileffect;
+.entity beam_hiteffect;
+.float beam_hitlight[4]; // 0: radius, 123: rgb
+.entity beam_muzzleeffect;
+.float beam_muzzlelight[4]; // 0: radius, 123: rgb
+.string beam_image;
+
+.entity beam_muzzleentity;
+
+.float beam_degreespersegment;
+.float beam_distancepersegment;
+.float beam_usevieworigin;
+.float beam_initialized;
+.float beam_maxangle;
+.float beam_range;
+.float beam_returnspeed;
+.float beam_tightness;
+.vector beam_shotorigin;
+
+entity Draw_ArcBeam_callback_entity;
+float Draw_ArcBeam_callback_last_thickness;
+vector Draw_ArcBeam_callback_last_top; // NOTE: in same coordinate system as player.
+vector Draw_ArcBeam_callback_last_bottom; // NOTE: in same coordinate system as player.
+#endif
#include "blaster.qh"
-#ifndef IMPLEMENTATION
-CLASS(Blaster, Weapon)
-/* ammotype */ //ATTRIB(Blaster, ammo_field, .int, ammo_none);
-/* impulse */ ATTRIB(Blaster, impulse, int, 1);
-/* flags */ ATTRIB(Blaster, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating */ ATTRIB(Blaster, bot_pickupbasevalue, float, 0);
-/* color */ ATTRIB(Blaster, wpcolor, vector, '1 0.5 0.5');
-/* modelname */ ATTRIB(Blaster, mdl, string, "laser");
-#ifdef GAMEQC
-/* model */ ATTRIB(Blaster, m_model, Model, MDL_BLASTER_ITEM);
-#endif
-/* crosshair */ ATTRIB(Blaster, w_crosshair, string, "gfx/crosshairlaser");
-/* crosshair */ ATTRIB(Blaster, w_crosshair_size, float, 0.5);
-/* wepimg */ ATTRIB(Blaster, model2, string, "weaponlaser");
-/* refname */ ATTRIB(Blaster, netname, string, "blaster");
-/* wepname */ ATTRIB(Blaster, m_name, string, _("Blaster"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, delay, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, force_zscale, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, shotangle, float, BOTH) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Blaster, blaster)
-#undef X
-
-ENDCLASS(Blaster)
-REGISTER_WEAPON(BLASTER, blaster, NEW(Blaster));
-#ifdef SVQC
-.float blaster_damage;
-.float blaster_edgedamage;
-.float blaster_radius;
-.float blaster_force;
-.float blaster_lifetime;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_blaster) { weapon_defaultspawnfunc(this, WEP_BLASTER); }
spawnfunc(weapon_laser) { spawnfunc_weapon_blaster(this); }
}
#endif
-#endif
#pragma once
+
+CLASS(Blaster, Weapon)
+/* ammotype */ //ATTRIB(Blaster, ammo_field, .int, ammo_none);
+/* impulse */ ATTRIB(Blaster, impulse, int, 1);
+/* flags */ ATTRIB(Blaster, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(Blaster, bot_pickupbasevalue, float, 0);
+/* color */ ATTRIB(Blaster, wpcolor, vector, '1 0.5 0.5');
+/* modelname */ ATTRIB(Blaster, mdl, string, "laser");
+#ifdef GAMEQC
+/* model */ ATTRIB(Blaster, m_model, Model, MDL_BLASTER_ITEM);
+#endif
+/* crosshair */ ATTRIB(Blaster, w_crosshair, string, "gfx/crosshairlaser");
+/* crosshair */ ATTRIB(Blaster, w_crosshair_size, float, 0.5);
+/* wepimg */ ATTRIB(Blaster, model2, string, "weaponlaser");
+/* refname */ ATTRIB(Blaster, netname, string, "blaster");
+/* wepname */ ATTRIB(Blaster, m_name, string, _("Blaster"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, delay, float, BOTH) \
+ P(class, prefix, edgedamage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, force_zscale, float, BOTH) \
+ P(class, prefix, lifetime, float, BOTH) \
+ P(class, prefix, radius, float, BOTH) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, secondary, float, NONE) \
+ P(class, prefix, shotangle, float, BOTH) \
+ P(class, prefix, speed, float, BOTH) \
+ P(class, prefix, spread, float, BOTH) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Blaster, blaster)
+#undef X
+
+ENDCLASS(Blaster)
+REGISTER_WEAPON(BLASTER, blaster, NEW(Blaster));
+
+#ifdef SVQC
+.float blaster_damage;
+.float blaster_edgedamage;
+.float blaster_radius;
+.float blaster_force;
+.float blaster_lifetime;
+#endif
#include "crylink.qh"
-#ifndef IMPLEMENTATION
-CLASS(Crylink, Weapon)
-/* ammotype */ ATTRIB(Crylink, ammo_field, .int, ammo_cells);
-/* impulse */ ATTRIB(Crylink, impulse, int, 6);
-/* flags */ ATTRIB(Crylink, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH | WEP_FLAG_CANCLIMB | WEP_FLAG_NODUAL);
-/* rating */ ATTRIB(Crylink, bot_pickupbasevalue, float, 6000);
-/* color */ ATTRIB(Crylink, wpcolor, vector, '1 0.5 1');
-/* modelname */ ATTRIB(Crylink, mdl, string, "crylink");
-#ifdef GAMEQC
-/* model */ ATTRIB(Crylink, m_model, Model, MDL_CRYLINK_ITEM);
-#endif
-/* crosshair */ ATTRIB(Crylink, w_crosshair, string, "gfx/crosshaircrylink");
-/* crosshair */ ATTRIB(Crylink, w_crosshair_size, float, 0.5);
-/* wepimg */ ATTRIB(Crylink, model2, string, "weaponcrylink");
-/* refname */ ATTRIB(Crylink, netname, string, "crylink");
-/* wepname */ ATTRIB(Crylink, m_name, string, _("Crylink"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bouncedamagefactor, float, BOTH) \
- P(class, prefix, bounces, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, joindelay, float, BOTH) \
- P(class, prefix, joinexplode, float, BOTH) \
- P(class, prefix, joinexplode_damage, float, BOTH) \
- P(class, prefix, joinexplode_edgedamage, float, BOTH) \
- P(class, prefix, joinexplode_force, float, BOTH) \
- P(class, prefix, joinexplode_radius, float, BOTH) \
- P(class, prefix, joinspread, float, BOTH) \
- P(class, prefix, linkexplode, float, BOTH) \
- P(class, prefix, middle_fadetime, float, BOTH) \
- P(class, prefix, middle_lifetime, float, BOTH) \
- P(class, prefix, other_fadetime, float, BOTH) \
- P(class, prefix, other_lifetime, float, BOTH) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, shots, float, BOTH) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, spreadtype, float, SEC) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Crylink, crylink)
-#undef X
-
-ENDCLASS(Crylink)
-REGISTER_WEAPON(CRYLINK, crylink, NEW(Crylink));
-#ifdef SVQC
-.float gravity;
-.float crylink_waitrelease;
-.entity crylink_lastgroup;
-
-.entity crylink_owner; // we can't use realowner, as that's subject to change
-
-.entity queuenext;
-.entity queueprev;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_crylink) { weapon_defaultspawnfunc(this, WEP_CRYLINK); }
}
}
#endif
-#endif
#pragma once
+
+CLASS(Crylink, Weapon)
+/* ammotype */ ATTRIB(Crylink, ammo_field, .int, ammo_cells);
+/* impulse */ ATTRIB(Crylink, impulse, int, 6);
+/* flags */ ATTRIB(Crylink, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH | WEP_FLAG_CANCLIMB | WEP_FLAG_NODUAL);
+/* rating */ ATTRIB(Crylink, bot_pickupbasevalue, float, 6000);
+/* color */ ATTRIB(Crylink, wpcolor, vector, '1 0.5 1');
+/* modelname */ ATTRIB(Crylink, mdl, string, "crylink");
+#ifdef GAMEQC
+/* model */ ATTRIB(Crylink, m_model, Model, MDL_CRYLINK_ITEM);
+#endif
+/* crosshair */ ATTRIB(Crylink, w_crosshair, string, "gfx/crosshaircrylink");
+/* crosshair */ ATTRIB(Crylink, w_crosshair_size, float, 0.5);
+/* wepimg */ ATTRIB(Crylink, model2, string, "weaponcrylink");
+/* refname */ ATTRIB(Crylink, netname, string, "crylink");
+/* wepname */ ATTRIB(Crylink, m_name, string, _("Crylink"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, BOTH) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, bouncedamagefactor, float, BOTH) \
+ P(class, prefix, bounces, float, BOTH) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, edgedamage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, joindelay, float, BOTH) \
+ P(class, prefix, joinexplode, float, BOTH) \
+ P(class, prefix, joinexplode_damage, float, BOTH) \
+ P(class, prefix, joinexplode_edgedamage, float, BOTH) \
+ P(class, prefix, joinexplode_force, float, BOTH) \
+ P(class, prefix, joinexplode_radius, float, BOTH) \
+ P(class, prefix, joinspread, float, BOTH) \
+ P(class, prefix, linkexplode, float, BOTH) \
+ P(class, prefix, middle_fadetime, float, BOTH) \
+ P(class, prefix, middle_lifetime, float, BOTH) \
+ P(class, prefix, other_fadetime, float, BOTH) \
+ P(class, prefix, other_lifetime, float, BOTH) \
+ P(class, prefix, radius, float, BOTH) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, secondary, float, NONE) \
+ P(class, prefix, shots, float, BOTH) \
+ P(class, prefix, speed, float, BOTH) \
+ P(class, prefix, spreadtype, float, SEC) \
+ P(class, prefix, spread, float, BOTH) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Crylink, crylink)
+#undef X
+
+ENDCLASS(Crylink)
+REGISTER_WEAPON(CRYLINK, crylink, NEW(Crylink));
+
+#ifdef SVQC
+.float gravity;
+.float crylink_waitrelease;
+.entity crylink_lastgroup;
+
+.entity crylink_owner; // we can't use realowner, as that's subject to change
+
+.entity queuenext;
+.entity queueprev;
+#endif
#include "devastator.qh"
-#ifndef IMPLEMENTATION
-CLASS(Devastator, Weapon)
-/* ammotype */ ATTRIB(Devastator, ammo_field, .int, ammo_rockets);
-/* impulse */ ATTRIB(Devastator, impulse, int, 9);
-/* flags */ ATTRIB(Devastator, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
-/* rating */ ATTRIB(Devastator, bot_pickupbasevalue, float, 8000);
-/* color */ ATTRIB(Devastator, wpcolor, vector, '1 1 0');
-/* modelname */ ATTRIB(Devastator, mdl, string, "rl");
-#ifdef GAMEQC
-/* model */ ATTRIB(Devastator, m_model, Model, MDL_DEVASTATOR_ITEM);
-#endif
-/* crosshair */ ATTRIB(Devastator, w_crosshair, string, "gfx/crosshairrocketlauncher");
-/* crosshair */ ATTRIB(Devastator, w_crosshair_size, float, 0.7);
-/* wepimg */ ATTRIB(Devastator, model2, string, "weaponrocketlauncher");
-/* refname */ ATTRIB(Devastator, netname, string, "devastator");
-/* wepname */ ATTRIB(Devastator, m_name, string, _("Devastator"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, NONE) \
- P(class, prefix, animtime, float, NONE) \
- P(class, prefix, damageforcescale, float, NONE) \
- P(class, prefix, damage, float, NONE) \
- P(class, prefix, detonatedelay, float, NONE) \
- P(class, prefix, edgedamage, float, NONE) \
- P(class, prefix, force, float, NONE) \
- P(class, prefix, guidedelay, float, NONE) \
- P(class, prefix, guidegoal, float, NONE) \
- P(class, prefix, guideratedelay, float, NONE) \
- P(class, prefix, guiderate, float, NONE) \
- P(class, prefix, guidestop, float, NONE) \
- P(class, prefix, health, float, NONE) \
- P(class, prefix, lifetime, float, NONE) \
- P(class, prefix, radius, float, NONE) \
- P(class, prefix, refire, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, remote_damage, float, NONE) \
- P(class, prefix, remote_edgedamage, float, NONE) \
- P(class, prefix, remote_force, float, NONE) \
- P(class, prefix, remote_jump_damage, float, NONE) \
- P(class, prefix, remote_jump_force, float, NONE) \
- P(class, prefix, remote_jump_radius, float, NONE) \
- P(class, prefix, remote_jump_velocity_z_add, float, NONE) \
- P(class, prefix, remote_jump_velocity_z_max, float, NONE) \
- P(class, prefix, remote_jump_velocity_z_min, float, NONE) \
- P(class, prefix, remote_radius, float, NONE) \
- P(class, prefix, speedaccel, float, NONE) \
- P(class, prefix, speedstart, float, NONE) \
- P(class, prefix, speed, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Devastator, devastator)
-#undef X
-
-ENDCLASS(Devastator)
-REGISTER_WEAPON(DEVASTATOR, devastator, NEW(Devastator));
-#ifdef SVQC
-.float rl_release;
-.float rl_detonate_later;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_devastator) { weapon_defaultspawnfunc(this, WEP_DEVASTATOR); }
spawnfunc(weapon_rocketlauncher) { spawnfunc_weapon_devastator(this); }
}
#endif
-#endif
#pragma once
+
+CLASS(Devastator, Weapon)
+/* ammotype */ ATTRIB(Devastator, ammo_field, .int, ammo_rockets);
+/* impulse */ ATTRIB(Devastator, impulse, int, 9);
+/* flags */ ATTRIB(Devastator, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
+/* rating */ ATTRIB(Devastator, bot_pickupbasevalue, float, 8000);
+/* color */ ATTRIB(Devastator, wpcolor, vector, '1 1 0');
+/* modelname */ ATTRIB(Devastator, mdl, string, "rl");
+#ifdef GAMEQC
+/* model */ ATTRIB(Devastator, m_model, Model, MDL_DEVASTATOR_ITEM);
+#endif
+/* crosshair */ ATTRIB(Devastator, w_crosshair, string, "gfx/crosshairrocketlauncher");
+/* crosshair */ ATTRIB(Devastator, w_crosshair_size, float, 0.7);
+/* wepimg */ ATTRIB(Devastator, model2, string, "weaponrocketlauncher");
+/* refname */ ATTRIB(Devastator, netname, string, "devastator");
+/* wepname */ ATTRIB(Devastator, m_name, string, _("Devastator"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, NONE) \
+ P(class, prefix, animtime, float, NONE) \
+ P(class, prefix, damageforcescale, float, NONE) \
+ P(class, prefix, damage, float, NONE) \
+ P(class, prefix, detonatedelay, float, NONE) \
+ P(class, prefix, edgedamage, float, NONE) \
+ P(class, prefix, force, float, NONE) \
+ P(class, prefix, guidedelay, float, NONE) \
+ P(class, prefix, guidegoal, float, NONE) \
+ P(class, prefix, guideratedelay, float, NONE) \
+ P(class, prefix, guiderate, float, NONE) \
+ P(class, prefix, guidestop, float, NONE) \
+ P(class, prefix, health, float, NONE) \
+ P(class, prefix, lifetime, float, NONE) \
+ P(class, prefix, radius, float, NONE) \
+ P(class, prefix, refire, float, NONE) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, remote_damage, float, NONE) \
+ P(class, prefix, remote_edgedamage, float, NONE) \
+ P(class, prefix, remote_force, float, NONE) \
+ P(class, prefix, remote_jump_damage, float, NONE) \
+ P(class, prefix, remote_jump_force, float, NONE) \
+ P(class, prefix, remote_jump_radius, float, NONE) \
+ P(class, prefix, remote_jump_velocity_z_add, float, NONE) \
+ P(class, prefix, remote_jump_velocity_z_max, float, NONE) \
+ P(class, prefix, remote_jump_velocity_z_min, float, NONE) \
+ P(class, prefix, remote_radius, float, NONE) \
+ P(class, prefix, speedaccel, float, NONE) \
+ P(class, prefix, speedstart, float, NONE) \
+ P(class, prefix, speed, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string,NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Devastator, devastator)
+#undef X
+
+ENDCLASS(Devastator)
+REGISTER_WEAPON(DEVASTATOR, devastator, NEW(Devastator));
+
+#ifdef SVQC
+.float rl_release;
+.float rl_detonate_later;
+#endif
#include "electro.qh"
-#ifndef IMPLEMENTATION
-CLASS(Electro, Weapon)
-/* ammotype */ ATTRIB(Electro, ammo_field, .int, ammo_cells);
-/* impulse */ ATTRIB(Electro, impulse, int, 5);
-/* flags */ ATTRIB(Electro, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating */ ATTRIB(Electro, bot_pickupbasevalue, float, 5000);
-/* color */ ATTRIB(Electro, wpcolor, vector, '0 0.5 1');
-/* modelname */ ATTRIB(Electro, mdl, string, "electro");
-#ifdef GAMEQC
-/* model */ ATTRIB(Electro, m_model, Model, MDL_ELECTRO_ITEM);
-#endif
-/* crosshair */ ATTRIB(Electro, w_crosshair, string, "gfx/crosshairelectro");
-/* crosshair */ ATTRIB(Electro, w_crosshair_size, float, 0.6);
-/* wepimg */ ATTRIB(Electro, model2, string, "weaponelectro");
-/* refname */ ATTRIB(Electro, netname, string, "electro");
-/* wepname */ ATTRIB(Electro, m_name, string, _("Electro"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bouncefactor, float, SEC) \
- P(class, prefix, bouncestop, float, SEC) \
- P(class, prefix, comboradius, float, PRI) \
- P(class, prefix, combo_comboradius, float, NONE) \
- P(class, prefix, combo_comboradius_thruwall, float, NONE) \
- P(class, prefix, combo_damage, float, NONE) \
- P(class, prefix, combo_edgedamage, float, NONE) \
- P(class, prefix, combo_force, float, NONE) \
- P(class, prefix, combo_radius, float, NONE) \
- P(class, prefix, combo_safeammocheck, float, NONE) \
- P(class, prefix, combo_speed, float, NONE) \
- P(class, prefix, count, float, SEC) \
- P(class, prefix, damagedbycontents, float, SEC) \
- P(class, prefix, damageforcescale, float, SEC) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, health, float, SEC) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, midaircombo_explode, float, PRI) \
- P(class, prefix, midaircombo_interval, float, PRI) \
- P(class, prefix, midaircombo_radius, float, PRI) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire2, float, SEC) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, speed_up, float, SEC) \
- P(class, prefix, speed_z, float, SEC) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, stick, float, SEC) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, touchexplode, float, SEC) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Electro, electro)
-#undef X
-
-ENDCLASS(Electro)
-REGISTER_WEAPON(ELECTRO, electro, NEW(Electro));
-
-#ifdef SVQC
-.float electro_count;
-.float electro_secondarytime;
-void W_Electro_ExplodeCombo(entity this);
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_electro) { weapon_defaultspawnfunc(this, WEP_ELECTRO); }
}
#endif
-#endif
#pragma once
+
+CLASS(Electro, Weapon)
+/* ammotype */ ATTRIB(Electro, ammo_field, .int, ammo_cells);
+/* impulse */ ATTRIB(Electro, impulse, int, 5);
+/* flags */ ATTRIB(Electro, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(Electro, bot_pickupbasevalue, float, 5000);
+/* color */ ATTRIB(Electro, wpcolor, vector, '0 0.5 1');
+/* modelname */ ATTRIB(Electro, mdl, string, "electro");
+#ifdef GAMEQC
+/* model */ ATTRIB(Electro, m_model, Model, MDL_ELECTRO_ITEM);
+#endif
+/* crosshair */ ATTRIB(Electro, w_crosshair, string, "gfx/crosshairelectro");
+/* crosshair */ ATTRIB(Electro, w_crosshair_size, float, 0.6);
+/* wepimg */ ATTRIB(Electro, model2, string, "weaponelectro");
+/* refname */ ATTRIB(Electro, netname, string, "electro");
+/* wepname */ ATTRIB(Electro, m_name, string, _("Electro"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, BOTH) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, bouncefactor, float, SEC) \
+ P(class, prefix, bouncestop, float, SEC) \
+ P(class, prefix, comboradius, float, PRI) \
+ P(class, prefix, combo_comboradius, float, NONE) \
+ P(class, prefix, combo_comboradius_thruwall, float, NONE) \
+ P(class, prefix, combo_damage, float, NONE) \
+ P(class, prefix, combo_edgedamage, float, NONE) \
+ P(class, prefix, combo_force, float, NONE) \
+ P(class, prefix, combo_radius, float, NONE) \
+ P(class, prefix, combo_safeammocheck, float, NONE) \
+ P(class, prefix, combo_speed, float, NONE) \
+ P(class, prefix, count, float, SEC) \
+ P(class, prefix, damagedbycontents, float, SEC) \
+ P(class, prefix, damageforcescale, float, SEC) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, edgedamage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, health, float, SEC) \
+ P(class, prefix, lifetime, float, BOTH) \
+ P(class, prefix, midaircombo_explode, float, PRI) \
+ P(class, prefix, midaircombo_interval, float, PRI) \
+ P(class, prefix, midaircombo_radius, float, PRI) \
+ P(class, prefix, radius, float, BOTH) \
+ P(class, prefix, refire2, float, SEC) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, speed, float, BOTH) \
+ P(class, prefix, speed_up, float, SEC) \
+ P(class, prefix, speed_z, float, SEC) \
+ P(class, prefix, spread, float, BOTH) \
+ P(class, prefix, stick, float, SEC) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, touchexplode, float, SEC) \
+ P(class, prefix, weaponreplace, string,NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Electro, electro)
+#undef X
+
+ENDCLASS(Electro)
+REGISTER_WEAPON(ELECTRO, electro, NEW(Electro));
+
+
+#ifdef SVQC
+.float electro_count;
+.float electro_secondarytime;
+void W_Electro_ExplodeCombo(entity this);
+#endif
#include "fireball.qh"
-#ifndef IMPLEMENTATION
-CLASS(Fireball, Weapon)
-/* ammotype */ //ATTRIB(Fireball, ammo_field, .int, ammo_none);
-/* impulse */ ATTRIB(Fireball, impulse, int, 9);
-/* flags */ ATTRIB(Fireball, spawnflags, int, WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
-/* rating */ ATTRIB(Fireball, bot_pickupbasevalue, float, 5000);
-/* color */ ATTRIB(Fireball, wpcolor, vector, '1 0.5 0');
-/* modelname */ ATTRIB(Fireball, mdl, string, "fireball");
-#ifdef GAMEQC
-/* model */ ATTRIB(Fireball, m_model, Model, MDL_FIREBALL_ITEM);
-#endif
-/* crosshair */ ATTRIB(Fireball, w_crosshair, string, "gfx/crosshairfireball");
-/* crosshair */ //ATTRIB(Fireball, w_crosshair_size, float, 0.65);
-/* wepimg */ ATTRIB(Fireball, model2, string, "weaponfireball");
-/* refname */ ATTRIB(Fireball, netname, string, "fireball");
-/* wepname */ ATTRIB(Fireball, m_name, string, _("Fireball"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bfgdamage, float, PRI) \
- P(class, prefix, bfgforce, float, PRI) \
- P(class, prefix, bfgradius, float, PRI) \
- P(class, prefix, damageforcescale, float, BOTH) \
- P(class, prefix, damagetime, float, SEC) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, PRI) \
- P(class, prefix, force, float, PRI) \
- P(class, prefix, health, float, PRI) \
- P(class, prefix, laserburntime, float, BOTH) \
- P(class, prefix, laserdamage, float, BOTH) \
- P(class, prefix, laseredgedamage, float, BOTH) \
- P(class, prefix, laserradius, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, radius, float, PRI) \
- P(class, prefix, refire2, float, PRI) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, speed_up, float, SEC) \
- P(class, prefix, speed_z, float, SEC) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Fireball, fireball)
-#undef X
-
-ENDCLASS(Fireball)
-REGISTER_WEAPON(FIREBALL, fireball, NEW(Fireball));
-#ifdef SVQC
-.float bot_primary_fireballmooth; // whatever a mooth is
-.vector fireball_impactvec;
-.float fireball_primarytime;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_fireball) { weapon_defaultspawnfunc(this, WEP_FIREBALL); }
}
#endif
-#endif
#pragma once
+
+CLASS(Fireball, Weapon)
+/* ammotype */ //ATTRIB(Fireball, ammo_field, .int, ammo_none);
+/* impulse */ ATTRIB(Fireball, impulse, int, 9);
+/* flags */ ATTRIB(Fireball, spawnflags, int, WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
+/* rating */ ATTRIB(Fireball, bot_pickupbasevalue, float, 5000);
+/* color */ ATTRIB(Fireball, wpcolor, vector, '1 0.5 0');
+/* modelname */ ATTRIB(Fireball, mdl, string, "fireball");
+#ifdef GAMEQC
+/* model */ ATTRIB(Fireball, m_model, Model, MDL_FIREBALL_ITEM);
+#endif
+/* crosshair */ ATTRIB(Fireball, w_crosshair, string, "gfx/crosshairfireball");
+/* crosshair */ //ATTRIB(Fireball, w_crosshair_size, float, 0.65);
+/* wepimg */ ATTRIB(Fireball, model2, string, "weaponfireball");
+/* refname */ ATTRIB(Fireball, netname, string, "fireball");
+/* wepname */ ATTRIB(Fireball, m_name, string, _("Fireball"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, bfgdamage, float, PRI) \
+ P(class, prefix, bfgforce, float, PRI) \
+ P(class, prefix, bfgradius, float, PRI) \
+ P(class, prefix, damageforcescale, float, BOTH) \
+ P(class, prefix, damagetime, float, SEC) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, edgedamage, float, PRI) \
+ P(class, prefix, force, float, PRI) \
+ P(class, prefix, health, float, PRI) \
+ P(class, prefix, laserburntime, float, BOTH) \
+ P(class, prefix, laserdamage, float, BOTH) \
+ P(class, prefix, laseredgedamage, float, BOTH) \
+ P(class, prefix, laserradius, float, BOTH) \
+ P(class, prefix, lifetime, float, BOTH) \
+ P(class, prefix, radius, float, PRI) \
+ P(class, prefix, refire2, float, PRI) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, speed, float, BOTH) \
+ P(class, prefix, speed_up, float, SEC) \
+ P(class, prefix, speed_z, float, SEC) \
+ P(class, prefix, spread, float, BOTH) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string,NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Fireball, fireball)
+#undef X
+
+ENDCLASS(Fireball)
+REGISTER_WEAPON(FIREBALL, fireball, NEW(Fireball));
+
+#ifdef SVQC
+.float bot_primary_fireballmooth; // whatever a mooth is
+.vector fireball_impactvec;
+.float fireball_primarytime;
+#endif
#include "hagar.qh"
-#ifndef IMPLEMENTATION
-CLASS(Hagar, Weapon)
-/* ammotype */ ATTRIB(Hagar, ammo_field, .int, ammo_rockets);
-/* impulse */ ATTRIB(Hagar, impulse, int, 8);
-/* flags */ ATTRIB(Hagar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating */ ATTRIB(Hagar, bot_pickupbasevalue, float, 6000);
-/* color */ ATTRIB(Hagar, wpcolor, vector, '1 1 0.5');
-/* modelname */ ATTRIB(Hagar, mdl, string, "hagar");
-#ifdef GAMEQC
-/* model */ ATTRIB(Hagar, m_model, Model, MDL_HAGAR_ITEM);
-#endif
-/* crosshair */ ATTRIB(Hagar, w_crosshair, string, "gfx/crosshairhagar");
-/* crosshair */ ATTRIB(Hagar, w_crosshair_size, float, 0.8);
-/* wepimg */ ATTRIB(Hagar, model2, string, "weaponhagar");
-/* refname */ ATTRIB(Hagar, netname, string, "hagar");
-/* wepname */ ATTRIB(Hagar, m_name, string, _("Hagar"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, damageforcescale, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, health, float, BOTH) \
- P(class, prefix, lifetime, float, PRI) \
- P(class, prefix, lifetime_min, float, SEC) \
- P(class, prefix, lifetime_rand, float, SEC) \
- P(class, prefix, load, float, SEC) \
- P(class, prefix, load_abort, float, SEC) \
- P(class, prefix, load_animtime, float, SEC) \
- P(class, prefix, load_hold, float, SEC) \
- P(class, prefix, load_linkexplode, float, SEC) \
- P(class, prefix, load_max, float, SEC) \
- P(class, prefix, load_releasedeath, float, SEC) \
- P(class, prefix, load_speed, float, SEC) \
- P(class, prefix, load_spread, float, SEC) \
- P(class, prefix, load_spread_bias, float, SEC) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Hagar, hagar)
-#undef X
-
-ENDCLASS(Hagar)
-REGISTER_WEAPON(HAGAR, hagar, NEW(Hagar));
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_hagar) { weapon_defaultspawnfunc(this, WEP_HAGAR); }
}
#endif
-#endif
#pragma once
+
+CLASS(Hagar, Weapon)
+/* ammotype */ ATTRIB(Hagar, ammo_field, .int, ammo_rockets);
+/* impulse */ ATTRIB(Hagar, impulse, int, 8);
+/* flags */ ATTRIB(Hagar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(Hagar, bot_pickupbasevalue, float, 6000);
+/* color */ ATTRIB(Hagar, wpcolor, vector, '1 1 0.5');
+/* modelname */ ATTRIB(Hagar, mdl, string, "hagar");
+#ifdef GAMEQC
+/* model */ ATTRIB(Hagar, m_model, Model, MDL_HAGAR_ITEM);
+#endif
+/* crosshair */ ATTRIB(Hagar, w_crosshair, string, "gfx/crosshairhagar");
+/* crosshair */ ATTRIB(Hagar, w_crosshair_size, float, 0.8);
+/* wepimg */ ATTRIB(Hagar, model2, string, "weaponhagar");
+/* refname */ ATTRIB(Hagar, netname, string, "hagar");
+/* wepname */ ATTRIB(Hagar, m_name, string, _("Hagar"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, BOTH) \
+ P(class, prefix, damageforcescale, float, BOTH) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, edgedamage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, health, float, BOTH) \
+ P(class, prefix, lifetime, float, PRI) \
+ P(class, prefix, lifetime_min, float, SEC) \
+ P(class, prefix, lifetime_rand, float, SEC) \
+ P(class, prefix, load, float, SEC) \
+ P(class, prefix, load_abort, float, SEC) \
+ P(class, prefix, load_animtime, float, SEC) \
+ P(class, prefix, load_hold, float, SEC) \
+ P(class, prefix, load_linkexplode, float, SEC) \
+ P(class, prefix, load_max, float, SEC) \
+ P(class, prefix, load_releasedeath, float, SEC) \
+ P(class, prefix, load_speed, float, SEC) \
+ P(class, prefix, load_spread, float, SEC) \
+ P(class, prefix, load_spread_bias, float, SEC) \
+ P(class, prefix, radius, float, BOTH) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, secondary, float, NONE) \
+ P(class, prefix, speed, float, BOTH) \
+ P(class, prefix, spread, float, BOTH) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string,NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Hagar, hagar)
+#undef X
+
+ENDCLASS(Hagar)
+REGISTER_WEAPON(HAGAR, hagar, NEW(Hagar));
#include "hlac.qh"
-#ifndef IMPLEMENTATION
-CLASS(HLAC, Weapon)
-/* ammotype */ ATTRIB(HLAC, ammo_field, .int, ammo_cells);
-/* impulse */ ATTRIB(HLAC, impulse, int, 6);
-/* flags */ ATTRIB(HLAC, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
-/* rating */ ATTRIB(HLAC, bot_pickupbasevalue, float, 4000);
-/* color */ ATTRIB(HLAC, wpcolor, vector, '0 1 0');
-/* modelname */ ATTRIB(HLAC, mdl, string, "hlac");
-#ifdef GAMEQC
-/* model */ ATTRIB(HLAC, m_model, Model, MDL_HLAC_ITEM);
-#endif
-/* crosshair */ ATTRIB(HLAC, w_crosshair, string, "gfx/crosshairhlac");
-/* crosshair */ ATTRIB(HLAC, w_crosshair_size, float, 0.6);
-/* wepimg */ ATTRIB(HLAC, model2, string, "weaponhlac");
-/* refname */ ATTRIB(HLAC, netname, string, "hlac");
-/* wepname */ ATTRIB(HLAC, m_name, string, _("Heavy Laser Assault Cannon"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, shots, float, SEC) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, spread, float, SEC) \
- P(class, prefix, spread_add, float, PRI) \
- P(class, prefix, spread_crouchmod, float, BOTH) \
- P(class, prefix, spread_max, float, PRI) \
- P(class, prefix, spread_min, float, PRI) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, HLAC, hlac)
-#undef X
-
-ENDCLASS(HLAC)
-REGISTER_WEAPON(HLAC, hlac, NEW(HLAC));
-
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_hlac) { weapon_defaultspawnfunc(this, WEP_HLAC); }
}
#endif
-#endif
#pragma once
+
+CLASS(HLAC, Weapon)
+/* ammotype */ ATTRIB(HLAC, ammo_field, .int, ammo_cells);
+/* impulse */ ATTRIB(HLAC, impulse, int, 6);
+/* flags */ ATTRIB(HLAC, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(HLAC, bot_pickupbasevalue, float, 4000);
+/* color */ ATTRIB(HLAC, wpcolor, vector, '0 1 0');
+/* modelname */ ATTRIB(HLAC, mdl, string, "hlac");
+#ifdef GAMEQC
+/* model */ ATTRIB(HLAC, m_model, Model, MDL_HLAC_ITEM);
+#endif
+/* crosshair */ ATTRIB(HLAC, w_crosshair, string, "gfx/crosshairhlac");
+/* crosshair */ ATTRIB(HLAC, w_crosshair_size, float, 0.6);
+/* wepimg */ ATTRIB(HLAC, model2, string, "weaponhlac");
+/* refname */ ATTRIB(HLAC, netname, string, "hlac");
+/* wepname */ ATTRIB(HLAC, m_name, string, _("Heavy Laser Assault Cannon"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, BOTH) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, edgedamage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, lifetime, float, BOTH) \
+ P(class, prefix, radius, float, BOTH) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, secondary, float, NONE) \
+ P(class, prefix, shots, float, SEC) \
+ P(class, prefix, speed, float, BOTH) \
+ P(class, prefix, spread, float, SEC) \
+ P(class, prefix, spread_add, float, PRI) \
+ P(class, prefix, spread_crouchmod, float, BOTH) \
+ P(class, prefix, spread_max, float, PRI) \
+ P(class, prefix, spread_min, float, PRI) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string,NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, HLAC, hlac)
+#undef X
+
+ENDCLASS(HLAC)
+REGISTER_WEAPON(HLAC, hlac, NEW(HLAC));
#include "hook.qh"
-#ifndef IMPLEMENTATION
-CLASS(Hook, Weapon)
-/* ammotype */ ATTRIB(Hook, ammo_field, .int, ammo_fuel);
-/* impulse */ ATTRIB(Hook, impulse, int, 0);
-/* flags */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating */ ATTRIB(Hook, bot_pickupbasevalue, float, 0);
-/* color */ ATTRIB(Hook, wpcolor, vector, '0 0.5 0');
-/* modelname */ ATTRIB(Hook, mdl, string, "hookgun");
-#ifdef GAMEQC
-/* model */ ATTRIB(Hook, m_model, Model, MDL_HOOK_ITEM);
-#endif
-/* crosshair */ ATTRIB(Hook, w_crosshair, string, "gfx/crosshairhook");
-/* crosshair */ ATTRIB(Hook, w_crosshair_size, float, 0.5);
-/* wepimg */ ATTRIB(Hook, model2, string, "weaponhook");
-/* refname */ ATTRIB(Hook, netname, string, "hook");
-/* wepname */ ATTRIB(Hook, m_name, string, _("Grappling Hook"));
- ATTRIB(Hook, ammo_factor, float, 1);
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, damageforcescale, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, duration, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, gravity, float, SEC) \
- P(class, prefix, health, float, SEC) \
- P(class, prefix, hooked_ammo, float, PRI) \
- P(class, prefix, hooked_time_free, float, PRI) \
- P(class, prefix, hooked_time_max, float, PRI) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, power, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Hook, hook)
-#undef X
-
-ENDCLASS(Hook)
-REGISTER_WEAPON(HOOK, hook, NEW(Hook));
-
-CLASS(OffhandHook, OffhandWeapon)
-#ifdef SVQC
- METHOD(OffhandHook, offhand_think, void(OffhandHook this, entity actor, bool key_pressed))
- {
- Weapon wep = WEP_HOOK;
- .entity weaponentity = weaponentities[1];
- wep.wr_think(wep, actor, weaponentity, key_pressed ? 1 : 0);
- }
-#endif
-ENDCLASS(OffhandHook)
-OffhandHook OFFHAND_HOOK; STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); }
#ifdef SVQC
-.float dmg;
-.float dmg_edge;
-.float dmg_radius;
-.float dmg_force;
-.float dmg_power;
-.float dmg_duration;
-.float dmg_last;
-.float hook_refire;
-.float hook_time_hooked;
-.float hook_time_fueldecrease;
-#endif
-#endif
-#ifdef IMPLEMENTATION
-#ifdef SVQC
-
spawnfunc(weapon_hook) { weapon_defaultspawnfunc(this, WEP_HOOK); }
void W_Hook_ExplodeThink(entity this)
// TODO: hook: temporarily transform this.origin for drawing the model along warpzones!
#endif
-
-#endif
#pragma once
+
+CLASS(Hook, Weapon)
+/* ammotype */ ATTRIB(Hook, ammo_field, .int, ammo_fuel);
+/* impulse */ ATTRIB(Hook, impulse, int, 0);
+/* flags */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(Hook, bot_pickupbasevalue, float, 0);
+/* color */ ATTRIB(Hook, wpcolor, vector, '0 0.5 0');
+/* modelname */ ATTRIB(Hook, mdl, string, "hookgun");
+#ifdef GAMEQC
+/* model */ ATTRIB(Hook, m_model, Model, MDL_HOOK_ITEM);
+#endif
+/* crosshair */ ATTRIB(Hook, w_crosshair, string, "gfx/crosshairhook");
+/* crosshair */ ATTRIB(Hook, w_crosshair_size, float, 0.5);
+/* wepimg */ ATTRIB(Hook, model2, string, "weaponhook");
+/* refname */ ATTRIB(Hook, netname, string, "hook");
+/* wepname */ ATTRIB(Hook, m_name, string, _("Grappling Hook"));
+ ATTRIB(Hook, ammo_factor, float, 1);
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, PRI) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, damageforcescale, float, SEC) \
+ P(class, prefix, damage, float, SEC) \
+ P(class, prefix, duration, float, SEC) \
+ P(class, prefix, edgedamage, float, SEC) \
+ P(class, prefix, force, float, SEC) \
+ P(class, prefix, gravity, float, SEC) \
+ P(class, prefix, health, float, SEC) \
+ P(class, prefix, hooked_ammo, float, PRI) \
+ P(class, prefix, hooked_time_free, float, PRI) \
+ P(class, prefix, hooked_time_max, float, PRI) \
+ P(class, prefix, lifetime, float, SEC) \
+ P(class, prefix, power, float, SEC) \
+ P(class, prefix, radius, float, SEC) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, speed, float, SEC) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Hook, hook)
+#undef X
+
+ENDCLASS(Hook)
+REGISTER_WEAPON(HOOK, hook, NEW(Hook));
+
+CLASS(OffhandHook, OffhandWeapon)
+#ifdef SVQC
+ METHOD(OffhandHook, offhand_think, void(OffhandHook this, entity actor, bool key_pressed))
+ {
+ Weapon wep = WEP_HOOK;
+ .entity weaponentity = weaponentities[1];
+ wep.wr_think(wep, actor, weaponentity, key_pressed ? 1 : 0);
+ }
+#endif
+ENDCLASS(OffhandHook)
+OffhandHook OFFHAND_HOOK; STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); }
+
+#ifdef SVQC
+
+.float dmg;
+.float dmg_edge;
+.float dmg_radius;
+.float dmg_force;
+.float dmg_power;
+.float dmg_duration;
+.float dmg_last;
+.float hook_refire;
+.float hook_time_hooked;
+.float hook_time_fueldecrease;
+#endif
#include "machinegun.qh"
-#ifndef IMPLEMENTATION
-CLASS(MachineGun, Weapon)
-/* ammotype */ ATTRIB(MachineGun, ammo_field, .int, ammo_nails);
-/* impulse */ ATTRIB(MachineGun, impulse, int, 3);
-/* flags */ ATTRIB(MachineGun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
-/* rating */ ATTRIB(MachineGun, bot_pickupbasevalue, float, 7000);
-/* color */ ATTRIB(MachineGun, wpcolor, vector, '1 1 0');
-/* modelname */ ATTRIB(MachineGun, mdl, string, "uzi");
-#ifdef GAMEQC
-/* model */ ATTRIB(MachineGun, m_model, Model, MDL_MACHINEGUN_ITEM);
-#endif
-/* crosshair */ ATTRIB(MachineGun, w_crosshair, string, "gfx/crosshairuzi");
-/* crosshair */ ATTRIB(MachineGun, w_crosshair_size, float, 0.6);
-/* wepimg */ ATTRIB(MachineGun, model2, string, "weaponuzi");
-/* refname */ ATTRIB(MachineGun, netname, string, "machinegun");
-/* wepname */ ATTRIB(MachineGun, m_name, string, _("MachineGun"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, burst, float, NONE) \
- P(class, prefix, burst_ammo, float, NONE) \
- P(class, prefix, burst_animtime, float, NONE) \
- P(class, prefix, burst_refire2, float, NONE) \
- P(class, prefix, burst_refire, float, NONE) \
- P(class, prefix, burst_speed, float, NONE) \
- P(class, prefix, first, float, NONE) \
- P(class, prefix, first_ammo, float, NONE) \
- P(class, prefix, first_damage, float, NONE) \
- P(class, prefix, first_force, float, NONE) \
- P(class, prefix, first_refire, float, NONE) \
- P(class, prefix, first_spread, float, NONE) \
- P(class, prefix, mode, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, solidpenetration, float, NONE) \
- P(class, prefix, spread_add, float, NONE) \
- P(class, prefix, spread_max, float, NONE) \
- P(class, prefix, spread_min, float, NONE) \
- P(class, prefix, sustained_ammo, float, NONE) \
- P(class, prefix, sustained_damage, float, NONE) \
- P(class, prefix, sustained_force, float, NONE) \
- P(class, prefix, sustained_refire, float, NONE) \
- P(class, prefix, sustained_spread, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, MachineGun, machinegun)
-#undef X
-
-ENDCLASS(MachineGun)
-REGISTER_WEAPON(MACHINEGUN, machinegun, NEW(MachineGun));
-
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_machinegun)
}
#endif
-#endif
#pragma once
+
+CLASS(MachineGun, Weapon)
+/* ammotype */ ATTRIB(MachineGun, ammo_field, .int, ammo_nails);
+/* impulse */ ATTRIB(MachineGun, impulse, int, 3);
+/* flags */ ATTRIB(MachineGun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
+/* rating */ ATTRIB(MachineGun, bot_pickupbasevalue, float, 7000);
+/* color */ ATTRIB(MachineGun, wpcolor, vector, '1 1 0');
+/* modelname */ ATTRIB(MachineGun, mdl, string, "uzi");
+#ifdef GAMEQC
+/* model */ ATTRIB(MachineGun, m_model, Model, MDL_MACHINEGUN_ITEM);
+#endif
+/* crosshair */ ATTRIB(MachineGun, w_crosshair, string, "gfx/crosshairuzi");
+/* crosshair */ ATTRIB(MachineGun, w_crosshair_size, float, 0.6);
+/* wepimg */ ATTRIB(MachineGun, model2, string, "weaponuzi");
+/* refname */ ATTRIB(MachineGun, netname, string, "machinegun");
+/* wepname */ ATTRIB(MachineGun, m_name, string, _("MachineGun"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, burst, float, NONE) \
+ P(class, prefix, burst_ammo, float, NONE) \
+ P(class, prefix, burst_animtime, float, NONE) \
+ P(class, prefix, burst_refire2, float, NONE) \
+ P(class, prefix, burst_refire, float, NONE) \
+ P(class, prefix, burst_speed, float, NONE) \
+ P(class, prefix, first, float, NONE) \
+ P(class, prefix, first_ammo, float, NONE) \
+ P(class, prefix, first_damage, float, NONE) \
+ P(class, prefix, first_force, float, NONE) \
+ P(class, prefix, first_refire, float, NONE) \
+ P(class, prefix, first_spread, float, NONE) \
+ P(class, prefix, mode, float, NONE) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, solidpenetration, float, NONE) \
+ P(class, prefix, spread_add, float, NONE) \
+ P(class, prefix, spread_max, float, NONE) \
+ P(class, prefix, spread_min, float, NONE) \
+ P(class, prefix, sustained_ammo, float, NONE) \
+ P(class, prefix, sustained_damage, float, NONE) \
+ P(class, prefix, sustained_force, float, NONE) \
+ P(class, prefix, sustained_refire, float, NONE) \
+ P(class, prefix, sustained_spread, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string,NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, MachineGun, machinegun)
+#undef X
+
+ENDCLASS(MachineGun)
+REGISTER_WEAPON(MACHINEGUN, machinegun, NEW(MachineGun));
#include "minelayer.qh"
-#ifndef IMPLEMENTATION
-CLASS(MineLayer, Weapon)
-/* ammotype */ ATTRIB(MineLayer, ammo_field, .int, ammo_rockets);
-/* impulse */ ATTRIB(MineLayer, impulse, int, 4);
-/* flags */ ATTRIB(MineLayer, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
-/* rating */ ATTRIB(MineLayer, bot_pickupbasevalue, float, 7000);
-/* color */ ATTRIB(MineLayer, wpcolor, vector, '0.75 1 0');
-/* modelname */ ATTRIB(MineLayer, mdl, string, "minelayer");
-#ifdef GAMEQC
-/* model */ ATTRIB(MineLayer, m_model, Model, MDL_MINELAYER_ITEM);
-#endif
-/* crosshair */ ATTRIB(MineLayer, w_crosshair, string, "gfx/crosshairminelayer");
-/* crosshair */ ATTRIB(MineLayer, w_crosshair_size, float, 0.9);
-/* wepimg */ ATTRIB(MineLayer, model2, string, "weaponminelayer");
-/* refname */ ATTRIB(MineLayer, netname, string, "minelayer");
-/* wepname */ ATTRIB(MineLayer, m_name, string, _("Mine Layer"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, NONE) \
- P(class, prefix, animtime, float, NONE) \
- P(class, prefix, damageforcescale, float, NONE) \
- P(class, prefix, damage, float, NONE) \
- P(class, prefix, detonatedelay, float, NONE) \
- P(class, prefix, edgedamage, float, NONE) \
- P(class, prefix, force, float, NONE) \
- P(class, prefix, health, float, NONE) \
- P(class, prefix, lifetime, float, NONE) \
- P(class, prefix, lifetime_countdown, float, NONE) \
- P(class, prefix, limit, float, NONE) \
- P(class, prefix, protection, float, NONE) \
- P(class, prefix, proximityradius, float, NONE) \
- P(class, prefix, radius, float, NONE) \
- P(class, prefix, refire, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, remote_damage, float, NONE) \
- P(class, prefix, remote_edgedamage, float, NONE) \
- P(class, prefix, remote_force, float, NONE) \
- P(class, prefix, remote_radius, float, NONE) \
- P(class, prefix, speed, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, time, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, MineLayer, minelayer)
-#undef X
-ENDCLASS(MineLayer)
-REGISTER_WEAPON(MINE_LAYER, minelayer, NEW(MineLayer));
-#ifdef SVQC
-void W_MineLayer_Think(entity this);
-.float minelayer_detonate, mine_explodeanyway;
-.float mine_time;
-.vector mine_orientation;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_minelayer) { weapon_defaultspawnfunc(this, WEP_MINE_LAYER); }
}
#endif
-#endif
#pragma once
+
+CLASS(MineLayer, Weapon)
+/* ammotype */ ATTRIB(MineLayer, ammo_field, .int, ammo_rockets);
+/* impulse */ ATTRIB(MineLayer, impulse, int, 4);
+/* flags */ ATTRIB(MineLayer, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(MineLayer, bot_pickupbasevalue, float, 7000);
+/* color */ ATTRIB(MineLayer, wpcolor, vector, '0.75 1 0');
+/* modelname */ ATTRIB(MineLayer, mdl, string, "minelayer");
+#ifdef GAMEQC
+/* model */ ATTRIB(MineLayer, m_model, Model, MDL_MINELAYER_ITEM);
+#endif
+/* crosshair */ ATTRIB(MineLayer, w_crosshair, string, "gfx/crosshairminelayer");
+/* crosshair */ ATTRIB(MineLayer, w_crosshair_size, float, 0.9);
+/* wepimg */ ATTRIB(MineLayer, model2, string, "weaponminelayer");
+/* refname */ ATTRIB(MineLayer, netname, string, "minelayer");
+/* wepname */ ATTRIB(MineLayer, m_name, string, _("Mine Layer"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, NONE) \
+ P(class, prefix, animtime, float, NONE) \
+ P(class, prefix, damageforcescale, float, NONE) \
+ P(class, prefix, damage, float, NONE) \
+ P(class, prefix, detonatedelay, float, NONE) \
+ P(class, prefix, edgedamage, float, NONE) \
+ P(class, prefix, force, float, NONE) \
+ P(class, prefix, health, float, NONE) \
+ P(class, prefix, lifetime, float, NONE) \
+ P(class, prefix, lifetime_countdown, float, NONE) \
+ P(class, prefix, limit, float, NONE) \
+ P(class, prefix, protection, float, NONE) \
+ P(class, prefix, proximityradius, float, NONE) \
+ P(class, prefix, radius, float, NONE) \
+ P(class, prefix, refire, float, NONE) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, remote_damage, float, NONE) \
+ P(class, prefix, remote_edgedamage, float, NONE) \
+ P(class, prefix, remote_force, float, NONE) \
+ P(class, prefix, remote_radius, float, NONE) \
+ P(class, prefix, speed, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, time, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, MineLayer, minelayer)
+#undef X
+ENDCLASS(MineLayer)
+REGISTER_WEAPON(MINE_LAYER, minelayer, NEW(MineLayer));
+
+#ifdef SVQC
+void W_MineLayer_Think(entity this);
+.float minelayer_detonate, mine_explodeanyway;
+.float mine_time;
+.vector mine_orientation;
+#endif
#include "mortar.qh"
-#ifndef IMPLEMENTATION
-CLASS(Mortar, Weapon)
-/* ammotype */ ATTRIB(Mortar, ammo_field, .int, ammo_rockets);
-/* impulse */ ATTRIB(Mortar, impulse, int, 4);
-/* flags */ ATTRIB(Mortar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating */ ATTRIB(Mortar, bot_pickupbasevalue, float, 7000);
-/* color */ ATTRIB(Mortar, wpcolor, vector, '1 0 0');
-/* modelname */ ATTRIB(Mortar, mdl, string, "gl");
-#ifdef GAMEQC
-/* model */ ATTRIB(Mortar, m_model, Model, MDL_MORTAR_ITEM);
-#endif
-/* crosshair */ ATTRIB(Mortar, w_crosshair, string, "gfx/crosshairgrenadelauncher");
-/* crosshair */ ATTRIB(Mortar, w_crosshair_size, float, 0.7);
-/* wepimg */ ATTRIB(Mortar, model2, string, "weapongrenadelauncher");
-/* refname */ ATTRIB(Mortar, netname, string, "mortar");
-/* wepname */ ATTRIB(Mortar, m_name, string, _("Mortar"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bouncefactor, float, NONE) \
- P(class, prefix, bouncestop, float, NONE) \
- P(class, prefix, damageforcescale, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, edgedamage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, health, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, lifetime_bounce, float, SEC) \
- P(class, prefix, lifetime_stick, float, BOTH) \
- P(class, prefix, radius, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, remote_detonateprimary, float, SEC) \
- P(class, prefix, remote_minbouncecnt, float, PRI) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, speed_up, float, BOTH) \
- P(class, prefix, speed_z, float, BOTH) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, type, float, BOTH) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Mortar, mortar)
-#undef X
-ENDCLASS(Mortar)
-REGISTER_WEAPON(MORTAR, mortar, NEW(Mortar));
-
-#ifdef SVQC
-.float gl_detonate_later;
-.float gl_bouncecnt;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_mortar) { weapon_defaultspawnfunc(this, WEP_MORTAR); }
}
#endif
-#endif
#pragma once
+
+CLASS(Mortar, Weapon)
+/* ammotype */ ATTRIB(Mortar, ammo_field, .int, ammo_rockets);
+/* impulse */ ATTRIB(Mortar, impulse, int, 4);
+/* flags */ ATTRIB(Mortar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(Mortar, bot_pickupbasevalue, float, 7000);
+/* color */ ATTRIB(Mortar, wpcolor, vector, '1 0 0');
+/* modelname */ ATTRIB(Mortar, mdl, string, "gl");
+#ifdef GAMEQC
+/* model */ ATTRIB(Mortar, m_model, Model, MDL_MORTAR_ITEM);
+#endif
+/* crosshair */ ATTRIB(Mortar, w_crosshair, string, "gfx/crosshairgrenadelauncher");
+/* crosshair */ ATTRIB(Mortar, w_crosshair_size, float, 0.7);
+/* wepimg */ ATTRIB(Mortar, model2, string, "weapongrenadelauncher");
+/* refname */ ATTRIB(Mortar, netname, string, "mortar");
+/* wepname */ ATTRIB(Mortar, m_name, string, _("Mortar"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, BOTH) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, bouncefactor, float, NONE) \
+ P(class, prefix, bouncestop, float, NONE) \
+ P(class, prefix, damageforcescale, float, BOTH) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, edgedamage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, health, float, BOTH) \
+ P(class, prefix, lifetime, float, BOTH) \
+ P(class, prefix, lifetime_bounce, float, SEC) \
+ P(class, prefix, lifetime_stick, float, BOTH) \
+ P(class, prefix, radius, float, BOTH) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, remote_detonateprimary, float, SEC) \
+ P(class, prefix, remote_minbouncecnt, float, PRI) \
+ P(class, prefix, speed, float, BOTH) \
+ P(class, prefix, speed_up, float, BOTH) \
+ P(class, prefix, speed_z, float, BOTH) \
+ P(class, prefix, spread, float, BOTH) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, type, float, BOTH) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Mortar, mortar)
+#undef X
+ENDCLASS(Mortar)
+REGISTER_WEAPON(MORTAR, mortar, NEW(Mortar));
+
+
+#ifdef SVQC
+.float gl_detonate_later;
+.float gl_bouncecnt;
+#endif
#include "porto.qh"
-#ifndef IMPLEMENTATION
-CLASS(PortoLaunch, Weapon)
-/* ammotype */ ATTRIB(PortoLaunch, ammo_field, .int, ammo_none);
-/* impulse */ ATTRIB(PortoLaunch, impulse, int, 0);
-/* flags */ ATTRIB(PortoLaunch, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON | WEP_FLAG_NODUAL);
-/* rating */ ATTRIB(PortoLaunch, bot_pickupbasevalue, float, 0);
-/* color */ ATTRIB(PortoLaunch, wpcolor, vector, '0.5 0.5 0.5');
-/* modelname */ ATTRIB(PortoLaunch, mdl, string, "porto");
-#ifdef GAMEQC
-/* model */ ATTRIB(PortoLaunch, m_model, Model, MDL_PORTO_ITEM);
-#endif
-/* crosshair */ ATTRIB(PortoLaunch, w_crosshair, string, "gfx/crosshairporto");
-/* crosshair */ ATTRIB(PortoLaunch, w_crosshair_size, float, 0.6);
-/* wepimg */ ATTRIB(PortoLaunch, model2, string, "weaponporto");
-/* refname */ ATTRIB(PortoLaunch, netname, string, "porto");
-/* wepname */ ATTRIB(PortoLaunch, m_name, string, _("Port-O-Launch"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, lifetime, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, speed, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, PortoLaunch, porto)
-#undef X
-ENDCLASS(PortoLaunch)
-REGISTER_WEAPON(PORTO, porto, NEW(PortoLaunch));
-#ifdef SVQC
-.entity porto_current;
-.vector porto_v_angle; // holds "held" view angles
-.float porto_v_angle_held;
-.vector right_vector;
-.float porto_forbidden;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
#include <common/triggers/trigger/jumppads.qh>
LOG_WARN("Since when does Porto send DamageInfo?");
}
#endif
-#endif
#pragma once
+
+CLASS(PortoLaunch, Weapon)
+/* ammotype */ ATTRIB(PortoLaunch, ammo_field, .int, ammo_none);
+/* impulse */ ATTRIB(PortoLaunch, impulse, int, 0);
+/* flags */ ATTRIB(PortoLaunch, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON | WEP_FLAG_NODUAL);
+/* rating */ ATTRIB(PortoLaunch, bot_pickupbasevalue, float, 0);
+/* color */ ATTRIB(PortoLaunch, wpcolor, vector, '0.5 0.5 0.5');
+/* modelname */ ATTRIB(PortoLaunch, mdl, string, "porto");
+#ifdef GAMEQC
+/* model */ ATTRIB(PortoLaunch, m_model, Model, MDL_PORTO_ITEM);
+#endif
+/* crosshair */ ATTRIB(PortoLaunch, w_crosshair, string, "gfx/crosshairporto");
+/* crosshair */ ATTRIB(PortoLaunch, w_crosshair_size, float, 0.6);
+/* wepimg */ ATTRIB(PortoLaunch, model2, string, "weaponporto");
+/* refname */ ATTRIB(PortoLaunch, netname, string, "porto");
+/* wepname */ ATTRIB(PortoLaunch, m_name, string, _("Port-O-Launch"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, lifetime, float, BOTH) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, secondary, float, NONE) \
+ P(class, prefix, speed, float, BOTH) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string,NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, PortoLaunch, porto)
+#undef X
+ENDCLASS(PortoLaunch)
+REGISTER_WEAPON(PORTO, porto, NEW(PortoLaunch));
+
+#ifdef SVQC
+.entity porto_current;
+.vector porto_v_angle; // holds "held" view angles
+.float porto_v_angle_held;
+.vector right_vector;
+.float porto_forbidden;
+#endif
#include "rifle.qh"
-#ifndef IMPLEMENTATION
-CLASS(Rifle, Weapon)
-/* ammotype */ ATTRIB(Rifle, ammo_field, .int, ammo_nails);
-/* impulse */ ATTRIB(Rifle, impulse, int, 7);
-/* flags */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
-/* rating */ ATTRIB(Rifle, bot_pickupbasevalue, float, 7000);
-/* color */ ATTRIB(Rifle, wpcolor, vector, '0.5 1 0');
-/* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
-#ifdef GAMEQC
-/* model */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM);
-#endif
-/* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
-/* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6);
-/* reticle */ ATTRIB(Rifle, w_reticle, string, "gfx/reticle_nex");
-/* wepimg */ ATTRIB(Rifle, model2, string, "weaponrifle");
-/* refname */ ATTRIB(Rifle, netname, string, "rifle");
-/* wepname */ ATTRIB(Rifle, m_name, string, _("Rifle"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bullethail, float, BOTH) \
- P(class, prefix, burstcost, float, BOTH) \
- P(class, prefix, bursttime, float, NONE) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload, float, SEC) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, shots, float, BOTH) \
- P(class, prefix, solidpenetration, float, BOTH) \
- P(class, prefix, spread, float, BOTH) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, tracer, float, BOTH) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Rifle, rifle)
-#undef X
-ENDCLASS(Rifle)
-REGISTER_WEAPON(RIFLE, rifle, NEW(Rifle));
-
-#ifdef SVQC
-.float rifle_accumulator;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_rifle) { weapon_defaultspawnfunc(this, WEP_RIFLE); }
spawnfunc(weapon_campingrifle) { spawnfunc_weapon_rifle(this); }
}
#endif
-#endif
#pragma once
+
+CLASS(Rifle, Weapon)
+/* ammotype */ ATTRIB(Rifle, ammo_field, .int, ammo_nails);
+/* impulse */ ATTRIB(Rifle, impulse, int, 7);
+/* flags */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
+/* rating */ ATTRIB(Rifle, bot_pickupbasevalue, float, 7000);
+/* color */ ATTRIB(Rifle, wpcolor, vector, '0.5 1 0');
+/* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
+#ifdef GAMEQC
+/* model */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM);
+#endif
+/* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
+/* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6);
+/* reticle */ ATTRIB(Rifle, w_reticle, string, "gfx/reticle_nex");
+/* wepimg */ ATTRIB(Rifle, model2, string, "weaponrifle");
+/* refname */ ATTRIB(Rifle, netname, string, "rifle");
+/* wepname */ ATTRIB(Rifle, m_name, string, _("Rifle"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, BOTH) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, bullethail, float, BOTH) \
+ P(class, prefix, burstcost, float, BOTH) \
+ P(class, prefix, bursttime, float, NONE) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, reload, float, SEC) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, secondary, float, NONE) \
+ P(class, prefix, shots, float, BOTH) \
+ P(class, prefix, solidpenetration, float, BOTH) \
+ P(class, prefix, spread, float, BOTH) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, tracer, float, BOTH) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Rifle, rifle)
+#undef X
+ENDCLASS(Rifle)
+REGISTER_WEAPON(RIFLE, rifle, NEW(Rifle));
+
+
+#ifdef SVQC
+.float rifle_accumulator;
+#endif
#include "seeker.qh"
-#ifndef IMPLEMENTATION
-CLASS(Seeker, Weapon)
-/* ammotype */ ATTRIB(Seeker, ammo_field, .int, ammo_rockets);
-/* impulse */ ATTRIB(Seeker, impulse, int, 8);
-/* flags */ ATTRIB(Seeker, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
-/* rating */ ATTRIB(Seeker, bot_pickupbasevalue, float, 5000);
-/* color */ ATTRIB(Seeker, wpcolor, vector, '0.5 1 0');
-/* modelname */ ATTRIB(Seeker, mdl, string, "seeker");
-#ifdef GAMEQC
-/* model */ ATTRIB(Seeker, m_model, Model, MDL_SEEKER_ITEM);
-#endif
-/* crosshair */ ATTRIB(Seeker, w_crosshair, string, "gfx/crosshairseeker");
-/* crosshair */ ATTRIB(Seeker, w_crosshair_size, float, 0.8);
-/* wepimg */ ATTRIB(Seeker, model2, string, "weaponseeker");
-/* refname */ ATTRIB(Seeker, netname, string, "seeker");
-/* wepname */ ATTRIB(Seeker, m_name, string, _("T.A.G. Seeker"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, flac_ammo, float, NONE) \
- P(class, prefix, flac_animtime, float, NONE) \
- P(class, prefix, flac_damage, float, NONE) \
- P(class, prefix, flac_edgedamage, float, NONE) \
- P(class, prefix, flac_force, float, NONE) \
- P(class, prefix, flac_lifetime, float, NONE) \
- P(class, prefix, flac_lifetime_rand, float, NONE) \
- P(class, prefix, flac_radius, float, NONE) \
- P(class, prefix, flac_refire, float, NONE) \
- P(class, prefix, flac_speed, float, NONE) \
- P(class, prefix, flac_speed_up, float, NONE) \
- P(class, prefix, flac_speed_z, float, NONE) \
- P(class, prefix, flac_spread, float, NONE) \
- P(class, prefix, missile_accel, float, NONE) \
- P(class, prefix, missile_ammo, float, NONE) \
- P(class, prefix, missile_animtime, float, NONE) \
- P(class, prefix, missile_count, float, NONE) \
- P(class, prefix, missile_damageforcescale, float, NONE) \
- P(class, prefix, missile_damage, float, NONE) \
- P(class, prefix, missile_decel, float, NONE) \
- P(class, prefix, missile_delay, float, NONE) \
- P(class, prefix, missile_edgedamage, float, NONE) \
- P(class, prefix, missile_force, float, NONE) \
- P(class, prefix, missile_health, float, NONE) \
- P(class, prefix, missile_lifetime, float, NONE) \
- P(class, prefix, missile_proxy, float, NONE) \
- P(class, prefix, missile_proxy_delay, float, NONE) \
- P(class, prefix, missile_proxy_maxrange, float, NONE) \
- P(class, prefix, missile_radius, float, NONE) \
- P(class, prefix, missile_refire, float, NONE) \
- P(class, prefix, missile_smart, float, NONE) \
- P(class, prefix, missile_smart_mindist, float, NONE) \
- P(class, prefix, missile_smart_trace_max, float, NONE) \
- P(class, prefix, missile_smart_trace_min, float, NONE) \
- P(class, prefix, missile_speed, float, NONE) \
- P(class, prefix, missile_speed_max, float, NONE) \
- P(class, prefix, missile_speed_up, float, NONE) \
- P(class, prefix, missile_speed_z, float, NONE) \
- P(class, prefix, missile_spread, float, NONE) \
- P(class, prefix, missile_turnrate, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, tag_ammo, float, NONE) \
- P(class, prefix, tag_animtime, float, NONE) \
- P(class, prefix, tag_damageforcescale, float, NONE) \
- P(class, prefix, tag_health, float, NONE) \
- P(class, prefix, tag_lifetime, float, NONE) \
- P(class, prefix, tag_refire, float, NONE) \
- P(class, prefix, tag_speed, float, NONE) \
- P(class, prefix, tag_spread, float, NONE) \
- P(class, prefix, tag_tracker_lifetime, float, NONE) \
- P(class, prefix, type, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Seeker, seeker)
-#undef X
-ENDCLASS(Seeker)
-REGISTER_WEAPON(SEEKER, seeker, NEW(Seeker));
-
-#ifdef SVQC
-.entity tag_target, wps_tag_tracker;
-.float tag_time;
-#endif
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_seeker) { weapon_defaultspawnfunc(this, WEP_SEEKER); }
}
#endif
-#endif
#pragma once
+CLASS(Seeker, Weapon)
+/* ammotype */ ATTRIB(Seeker, ammo_field, .int, ammo_rockets);
+/* impulse */ ATTRIB(Seeker, impulse, int, 8);
+/* flags */ ATTRIB(Seeker, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(Seeker, bot_pickupbasevalue, float, 5000);
+/* color */ ATTRIB(Seeker, wpcolor, vector, '0.5 1 0');
+/* modelname */ ATTRIB(Seeker, mdl, string, "seeker");
+#ifdef GAMEQC
+/* model */ ATTRIB(Seeker, m_model, Model, MDL_SEEKER_ITEM);
+#endif
+/* crosshair */ ATTRIB(Seeker, w_crosshair, string, "gfx/crosshairseeker");
+/* crosshair */ ATTRIB(Seeker, w_crosshair_size, float, 0.8);
+/* wepimg */ ATTRIB(Seeker, model2, string, "weaponseeker");
+/* refname */ ATTRIB(Seeker, netname, string, "seeker");
+/* wepname */ ATTRIB(Seeker, m_name, string, _("T.A.G. Seeker"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, flac_ammo, float, NONE) \
+ P(class, prefix, flac_animtime, float, NONE) \
+ P(class, prefix, flac_damage, float, NONE) \
+ P(class, prefix, flac_edgedamage, float, NONE) \
+ P(class, prefix, flac_force, float, NONE) \
+ P(class, prefix, flac_lifetime, float, NONE) \
+ P(class, prefix, flac_lifetime_rand, float, NONE) \
+ P(class, prefix, flac_radius, float, NONE) \
+ P(class, prefix, flac_refire, float, NONE) \
+ P(class, prefix, flac_speed, float, NONE) \
+ P(class, prefix, flac_speed_up, float, NONE) \
+ P(class, prefix, flac_speed_z, float, NONE) \
+ P(class, prefix, flac_spread, float, NONE) \
+ P(class, prefix, missile_accel, float, NONE) \
+ P(class, prefix, missile_ammo, float, NONE) \
+ P(class, prefix, missile_animtime, float, NONE) \
+ P(class, prefix, missile_count, float, NONE) \
+ P(class, prefix, missile_damageforcescale, float, NONE) \
+ P(class, prefix, missile_damage, float, NONE) \
+ P(class, prefix, missile_decel, float, NONE) \
+ P(class, prefix, missile_delay, float, NONE) \
+ P(class, prefix, missile_edgedamage, float, NONE) \
+ P(class, prefix, missile_force, float, NONE) \
+ P(class, prefix, missile_health, float, NONE) \
+ P(class, prefix, missile_lifetime, float, NONE) \
+ P(class, prefix, missile_proxy, float, NONE) \
+ P(class, prefix, missile_proxy_delay, float, NONE) \
+ P(class, prefix, missile_proxy_maxrange, float, NONE) \
+ P(class, prefix, missile_radius, float, NONE) \
+ P(class, prefix, missile_refire, float, NONE) \
+ P(class, prefix, missile_smart, float, NONE) \
+ P(class, prefix, missile_smart_mindist, float, NONE) \
+ P(class, prefix, missile_smart_trace_max, float, NONE) \
+ P(class, prefix, missile_smart_trace_min, float, NONE) \
+ P(class, prefix, missile_speed, float, NONE) \
+ P(class, prefix, missile_speed_max, float, NONE) \
+ P(class, prefix, missile_speed_up, float, NONE) \
+ P(class, prefix, missile_speed_z, float, NONE) \
+ P(class, prefix, missile_spread, float, NONE) \
+ P(class, prefix, missile_turnrate, float, NONE) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, tag_ammo, float, NONE) \
+ P(class, prefix, tag_animtime, float, NONE) \
+ P(class, prefix, tag_damageforcescale, float, NONE) \
+ P(class, prefix, tag_health, float, NONE) \
+ P(class, prefix, tag_lifetime, float, NONE) \
+ P(class, prefix, tag_refire, float, NONE) \
+ P(class, prefix, tag_speed, float, NONE) \
+ P(class, prefix, tag_spread, float, NONE) \
+ P(class, prefix, tag_tracker_lifetime, float, NONE) \
+ P(class, prefix, type, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Seeker, seeker)
+#undef X
+ENDCLASS(Seeker)
+REGISTER_WEAPON(SEEKER, seeker, NEW(Seeker));
+
#ifdef SVQC
+.entity tag_target, wps_tag_tracker;
+.float tag_time;
+
IntrusiveList g_seeker_trackers;
STATIC_INIT(g_seeker_trackers) { g_seeker_trackers = IL_NEW(); }
#endif
#include "shockwave.qh"
-#ifndef IMPLEMENTATION
-CLASS(Shockwave, Weapon)
-/* ammotype */ //ATTRIB(Shockwave, ammo_field, .int, ammo_none);
-/* impulse */ ATTRIB(Shockwave, impulse, int, 2);
-/* flags */ ATTRIB(Shockwave, spawnflags, int, WEP_TYPE_HITSCAN | WEP_FLAG_CANCLIMB | WEP_TYPE_MELEE_SEC);
-/* rating */ ATTRIB(Shockwave, bot_pickupbasevalue, float, 3000);
-/* color */ ATTRIB(Shockwave, wpcolor, vector, '0.5 0.25 0');
-/* modelname */ ATTRIB(Shockwave, mdl, string, "shotgun");
-#ifdef GAMEQC
-/* model */ ATTRIB(Shockwave, m_model, Model, MDL_SHOCKWAVE_ITEM);
-#endif
-/* crosshair */ ATTRIB(Shockwave, w_crosshair, string, "gfx/crosshairshotgun");
-/* crosshair */ ATTRIB(Shockwave, w_crosshair_size, float, 0.7);
-/* wepimg */ ATTRIB(Shockwave, model2, string, "weaponshockwave");
-/* refname */ ATTRIB(Shockwave, netname, string, "shockwave");
-/* wepname */ ATTRIB(Shockwave, m_name, string, _("Shockwave"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, blast_animtime, float, NONE) \
- P(class, prefix, blast_damage, float, NONE) \
- P(class, prefix, blast_distance, float, NONE) \
- P(class, prefix, blast_edgedamage, float, NONE) \
- P(class, prefix, blast_force, float, NONE) \
- P(class, prefix, blast_force_forwardbias, float, NONE) \
- P(class, prefix, blast_force_zscale, float, NONE) \
- P(class, prefix, blast_jump_damage, float, NONE) \
- P(class, prefix, blast_jump_edgedamage, float, NONE) \
- P(class, prefix, blast_jump_force, float, NONE) \
- P(class, prefix, blast_jump_force_velocitybias, float, NONE) \
- P(class, prefix, blast_jump_force_zscale, float, NONE) \
- P(class, prefix, blast_jump_multiplier_accuracy, float, NONE) \
- P(class, prefix, blast_jump_multiplier_distance, float, NONE) \
- P(class, prefix, blast_jump_multiplier_min, float, NONE) \
- P(class, prefix, blast_jump_radius, float, NONE) \
- P(class, prefix, blast_multiplier_accuracy, float, NONE) \
- P(class, prefix, blast_multiplier_distance, float, NONE) \
- P(class, prefix, blast_multiplier_min, float, NONE) \
- P(class, prefix, blast_refire, float, NONE) \
- P(class, prefix, blast_splash_damage, float, NONE) \
- P(class, prefix, blast_splash_edgedamage, float, NONE) \
- P(class, prefix, blast_splash_force, float, NONE) \
- P(class, prefix, blast_splash_force_forwardbias, float, NONE) \
- P(class, prefix, blast_splash_multiplier_accuracy, float, NONE) \
- P(class, prefix, blast_splash_multiplier_distance, float, NONE) \
- P(class, prefix, blast_splash_multiplier_min, float, NONE) \
- P(class, prefix, blast_splash_radius, float, NONE) \
- P(class, prefix, blast_spread_max, float, NONE) \
- P(class, prefix, blast_spread_min, float, NONE) \
- P(class, prefix, melee_animtime, float, NONE) \
- P(class, prefix, melee_damage, float, NONE) \
- P(class, prefix, melee_delay, float, NONE) \
- P(class, prefix, melee_force, float, NONE) \
- P(class, prefix, melee_multihit, float, NONE) \
- P(class, prefix, melee_no_doubleslap, float, NONE) \
- P(class, prefix, melee_nonplayerdamage, float, NONE) \
- P(class, prefix, melee_range, float, NONE) \
- P(class, prefix, melee_refire, float, NONE) \
- P(class, prefix, melee_swing_side, float, NONE) \
- P(class, prefix, melee_swing_up, float, NONE) \
- P(class, prefix, melee_time, float, NONE) \
- P(class, prefix, melee_traces, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Shockwave, shockwave)
-#undef X
-
-ENDCLASS(Shockwave)
-REGISTER_WEAPON(SHOCKWAVE, shockwave, NEW(Shockwave));
-
-
-#ifdef CSQC
-void Net_ReadShockwaveParticle();
-.vector sw_shotorg;
-.vector sw_shotdir;
-.float sw_distance;
-.float sw_spread_max;
-.float sw_spread_min;
-.float sw_time;
-#endif
-#endif
-#ifdef IMPLEMENTATION
REGISTER_NET_TEMP(TE_CSQC_SHOCKWAVEPARTICLE)
}
#endif
-#endif
#pragma once
+
+CLASS(Shockwave, Weapon)
+/* ammotype */ //ATTRIB(Shockwave, ammo_field, .int, ammo_none);
+/* impulse */ ATTRIB(Shockwave, impulse, int, 2);
+/* flags */ ATTRIB(Shockwave, spawnflags, int, WEP_TYPE_HITSCAN | WEP_FLAG_CANCLIMB | WEP_TYPE_MELEE_SEC);
+/* rating */ ATTRIB(Shockwave, bot_pickupbasevalue, float, 3000);
+/* color */ ATTRIB(Shockwave, wpcolor, vector, '0.5 0.25 0');
+/* modelname */ ATTRIB(Shockwave, mdl, string, "shotgun");
+#ifdef GAMEQC
+/* model */ ATTRIB(Shockwave, m_model, Model, MDL_SHOCKWAVE_ITEM);
+#endif
+/* crosshair */ ATTRIB(Shockwave, w_crosshair, string, "gfx/crosshairshotgun");
+/* crosshair */ ATTRIB(Shockwave, w_crosshair_size, float, 0.7);
+/* wepimg */ ATTRIB(Shockwave, model2, string, "weaponshockwave");
+/* refname */ ATTRIB(Shockwave, netname, string, "shockwave");
+/* wepname */ ATTRIB(Shockwave, m_name, string, _("Shockwave"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, blast_animtime, float, NONE) \
+ P(class, prefix, blast_damage, float, NONE) \
+ P(class, prefix, blast_distance, float, NONE) \
+ P(class, prefix, blast_edgedamage, float, NONE) \
+ P(class, prefix, blast_force, float, NONE) \
+ P(class, prefix, blast_force_forwardbias, float, NONE) \
+ P(class, prefix, blast_force_zscale, float, NONE) \
+ P(class, prefix, blast_jump_damage, float, NONE) \
+ P(class, prefix, blast_jump_edgedamage, float, NONE) \
+ P(class, prefix, blast_jump_force, float, NONE) \
+ P(class, prefix, blast_jump_force_velocitybias, float, NONE) \
+ P(class, prefix, blast_jump_force_zscale, float, NONE) \
+ P(class, prefix, blast_jump_multiplier_accuracy, float, NONE) \
+ P(class, prefix, blast_jump_multiplier_distance, float, NONE) \
+ P(class, prefix, blast_jump_multiplier_min, float, NONE) \
+ P(class, prefix, blast_jump_radius, float, NONE) \
+ P(class, prefix, blast_multiplier_accuracy, float, NONE) \
+ P(class, prefix, blast_multiplier_distance, float, NONE) \
+ P(class, prefix, blast_multiplier_min, float, NONE) \
+ P(class, prefix, blast_refire, float, NONE) \
+ P(class, prefix, blast_splash_damage, float, NONE) \
+ P(class, prefix, blast_splash_edgedamage, float, NONE) \
+ P(class, prefix, blast_splash_force, float, NONE) \
+ P(class, prefix, blast_splash_force_forwardbias, float, NONE) \
+ P(class, prefix, blast_splash_multiplier_accuracy, float, NONE) \
+ P(class, prefix, blast_splash_multiplier_distance, float, NONE) \
+ P(class, prefix, blast_splash_multiplier_min, float, NONE) \
+ P(class, prefix, blast_splash_radius, float, NONE) \
+ P(class, prefix, blast_spread_max, float, NONE) \
+ P(class, prefix, blast_spread_min, float, NONE) \
+ P(class, prefix, melee_animtime, float, NONE) \
+ P(class, prefix, melee_damage, float, NONE) \
+ P(class, prefix, melee_delay, float, NONE) \
+ P(class, prefix, melee_force, float, NONE) \
+ P(class, prefix, melee_multihit, float, NONE) \
+ P(class, prefix, melee_no_doubleslap, float, NONE) \
+ P(class, prefix, melee_nonplayerdamage, float, NONE) \
+ P(class, prefix, melee_range, float, NONE) \
+ P(class, prefix, melee_refire, float, NONE) \
+ P(class, prefix, melee_swing_side, float, NONE) \
+ P(class, prefix, melee_swing_up, float, NONE) \
+ P(class, prefix, melee_time, float, NONE) \
+ P(class, prefix, melee_traces, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Shockwave, shockwave)
+#undef X
+
+ENDCLASS(Shockwave)
+REGISTER_WEAPON(SHOCKWAVE, shockwave, NEW(Shockwave));
+
+
+#ifdef CSQC
+void Net_ReadShockwaveParticle();
+.vector sw_shotorg;
+.vector sw_shotdir;
+.float sw_distance;
+.float sw_spread_max;
+.float sw_spread_min;
+.float sw_time;
+#endif
#include "shotgun.qh"
-#ifndef IMPLEMENTATION
-CLASS(Shotgun, Weapon)
-/* ammotype */ ATTRIB(Shotgun, ammo_field, .int, ammo_shells);
-/* impulse */ ATTRIB(Shotgun, impulse, int, 2);
-/* flags */ ATTRIB(Shotgun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_TYPE_MELEE_SEC);
-/* rating */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
-/* color */ ATTRIB(Shotgun, wpcolor, vector, '0.5 0.25 0');
-/* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
-#ifdef GAMEQC
-/* model */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
-#endif
-/* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
-/* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
-/* wepimg */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
-/* refname */ ATTRIB(Shotgun, netname, string, "shotgun");
-/* wepname */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, alt_animtime, float, SEC) \
- P(class, prefix, alt_refire, float, SEC) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, bullets, float, PRI) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, melee_delay, float, SEC) \
- P(class, prefix, melee_multihit, float, SEC) \
- P(class, prefix, melee_nonplayerdamage, float, SEC) \
- P(class, prefix, melee_no_doubleslap, float, SEC) \
- P(class, prefix, melee_range, float, SEC) \
- P(class, prefix, melee_swing_side, float, SEC) \
- P(class, prefix, melee_swing_up, float, SEC) \
- P(class, prefix, melee_time, float, SEC) \
- P(class, prefix, melee_traces, float, SEC) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, solidpenetration, float, PRI) \
- P(class, prefix, spread, float, PRI) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string,NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Shotgun, shotgun)
-#undef X
-
-ENDCLASS(Shotgun)
-REGISTER_WEAPON(SHOTGUN, shotgun, NEW(Shotgun));
-
-#endif
-#ifdef IMPLEMENTATION
#ifdef SVQC
spawnfunc(weapon_shotgun) { weapon_defaultspawnfunc(this, WEP_SHOTGUN); }
}
#endif
-#endif
#pragma once
+
+CLASS(Shotgun, Weapon)
+/* ammotype */ ATTRIB(Shotgun, ammo_field, .int, ammo_shells);
+/* impulse */ ATTRIB(Shotgun, impulse, int, 2);
+/* flags */ ATTRIB(Shotgun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_TYPE_MELEE_SEC);
+/* rating */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
+/* color */ ATTRIB(Shotgun, wpcolor, vector, '0.5 0.25 0');
+/* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
+#ifdef GAMEQC
+/* model */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
+#endif
+/* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
+/* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
+/* wepimg */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
+/* refname */ ATTRIB(Shotgun, netname, string, "shotgun");
+/* wepname */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, alt_animtime, float, SEC) \
+ P(class, prefix, alt_refire, float, SEC) \
+ P(class, prefix, ammo, float, PRI) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, bullets, float, PRI) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, melee_delay, float, SEC) \
+ P(class, prefix, melee_multihit, float, SEC) \
+ P(class, prefix, melee_nonplayerdamage, float, SEC) \
+ P(class, prefix, melee_no_doubleslap, float, SEC) \
+ P(class, prefix, melee_range, float, SEC) \
+ P(class, prefix, melee_swing_side, float, SEC) \
+ P(class, prefix, melee_swing_up, float, SEC) \
+ P(class, prefix, melee_time, float, SEC) \
+ P(class, prefix, melee_traces, float, SEC) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, secondary, float, NONE) \
+ P(class, prefix, solidpenetration, float, PRI) \
+ P(class, prefix, spread, float, PRI) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string,NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Shotgun, shotgun)
+#undef X
+
+ENDCLASS(Shotgun)
+REGISTER_WEAPON(SHOTGUN, shotgun, NEW(Shotgun));
#include "tuba.qh"
-#ifndef IMPLEMENTATION
-CLASS(Tuba, Weapon)
-/* impulse */ ATTRIB(Tuba, impulse, int, 1);
-/* flags */ ATTRIB(Tuba, spawnflags, int, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
-/* rating */ ATTRIB(Tuba, bot_pickupbasevalue, float, 2000);
-/* color */ ATTRIB(Tuba, wpcolor, vector, '0 1 0');
-/* modelname */ ATTRIB(Tuba, mdl, string, "tuba");
-#ifdef GAMEQC
-/* model */ ATTRIB(Tuba, m_model, Model, MDL_TUBA_ITEM);
-#endif
-/* crosshair */ ATTRIB(Tuba, w_crosshair, string, "gfx/crosshairtuba");
-/* crosshair */ //ATTRIB(Tuba, w_crosshair_size, float, 0.65);
-/* wepimg */ ATTRIB(Tuba, model2, string, "weapontuba");
-/* refname */ ATTRIB(Tuba, netname, string, "tuba");
-/* xgettext:no-c-format */
-/* wepname */ ATTRIB(Tuba, m_name, string, _("@!#%'n Tuba"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, animtime, float, NONE) \
- P(class, prefix, attenuation, float, NONE) \
- P(class, prefix, damage, float, NONE) \
- P(class, prefix, edgedamage, float, NONE) \
- P(class, prefix, fadetime, float, NONE) \
- P(class, prefix, force, float, NONE) \
- P(class, prefix, pitchstep, float, NONE) \
- P(class, prefix, radius, float, NONE) \
- P(class, prefix, refire, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, volume, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Tuba, tuba)
-#undef X
-ENDCLASS(Tuba)
-REGISTER_WEAPON(TUBA, tuba, NEW(Tuba));
-#endif
-
-#ifdef IMPLEMENTATION
#ifdef SVQC
}
#endif
-#endif
#pragma once
+CLASS(Tuba, Weapon)
+/* impulse */ ATTRIB(Tuba, impulse, int, 1);
+/* flags */ ATTRIB(Tuba, spawnflags, int, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
+/* rating */ ATTRIB(Tuba, bot_pickupbasevalue, float, 2000);
+/* color */ ATTRIB(Tuba, wpcolor, vector, '0 1 0');
+/* modelname */ ATTRIB(Tuba, mdl, string, "tuba");
+#ifdef GAMEQC
+/* model */ ATTRIB(Tuba, m_model, Model, MDL_TUBA_ITEM);
+#endif
+/* crosshair */ ATTRIB(Tuba, w_crosshair, string, "gfx/crosshairtuba");
+/* crosshair */ //ATTRIB(Tuba, w_crosshair_size, float, 0.65);
+/* wepimg */ ATTRIB(Tuba, model2, string, "weapontuba");
+/* refname */ ATTRIB(Tuba, netname, string, "tuba");
+/* xgettext:no-c-format */
+/* wepname */ ATTRIB(Tuba, m_name, string, _("@!#%'n Tuba"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, animtime, float, NONE) \
+ P(class, prefix, attenuation, float, NONE) \
+ P(class, prefix, damage, float, NONE) \
+ P(class, prefix, edgedamage, float, NONE) \
+ P(class, prefix, fadetime, float, NONE) \
+ P(class, prefix, force, float, NONE) \
+ P(class, prefix, pitchstep, float, NONE) \
+ P(class, prefix, radius, float, NONE) \
+ P(class, prefix, refire, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, volume, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Tuba, tuba)
+#undef X
+ENDCLASS(Tuba)
+REGISTER_WEAPON(TUBA, tuba, NEW(Tuba));
+
#ifdef CSQC
entityclass(Tuba);
class(Tuba) .int note;
#include "vaporizer.qh"
-#ifndef IMPLEMENTATION
-CLASS(Vaporizer, Weapon)
-/* ammotype */ ATTRIB(Vaporizer, ammo_field, .int, ammo_cells);
-/* impulse */ ATTRIB(Vaporizer, impulse, int, 7);
-/* flags */ ATTRIB(Vaporizer, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
-/* rating */ ATTRIB(Vaporizer, bot_pickupbasevalue, float, 10000);
-/* color */ ATTRIB(Vaporizer, wpcolor, vector, '0.5 1 1');
-/* modelname */ ATTRIB(Vaporizer, mdl, string, "minstanex");
-#ifdef GAMEQC
-/* model */ ATTRIB(Vaporizer, m_model, Model, MDL_VAPORIZER_ITEM);
-#endif
-/* crosshair */ ATTRIB(Vaporizer, w_crosshair, string, "gfx/crosshairminstanex");
-/* crosshair */ ATTRIB(Vaporizer, w_crosshair_size, float, 0.6);
-/* reticle */ ATTRIB(Vaporizer, w_reticle, string, "gfx/reticle_nex");
-/* wepimg */ ATTRIB(Vaporizer, model2, string, "weaponminstanex");
-/* refname */ ATTRIB(Vaporizer, netname, string, "vaporizer");
-/* wepname */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, PRI) \
- P(class, prefix, animtime, float, PRI) \
- P(class, prefix, damage, float, PRI) \
- P(class, prefix, refire, float, PRI) \
- P(class, prefix, ammo, float, SEC) \
- P(class, prefix, animtime, float, SEC) \
- P(class, prefix, damage, float, SEC) \
- P(class, prefix, delay, float, SEC) \
- P(class, prefix, edgedamage, float, SEC) \
- P(class, prefix, force, float, SEC) \
- P(class, prefix, lifetime, float, SEC) \
- P(class, prefix, radius, float, SEC) \
- P(class, prefix, refire, float, SEC) \
- P(class, prefix, shotangle, float, SEC) \
- P(class, prefix, speed, float, SEC) \
- P(class, prefix, spread, float, SEC) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Vaporizer, vaporizer)
-#undef X
-
-ENDCLASS(Vaporizer)
-REGISTER_WEAPON(VAPORIZER, vaporizer, NEW(Vaporizer));
-
-
-#ifdef SVQC
-.float vaporizer_lasthit;
-.float jump_interval;
-.float jump_interval2;
-.bool held_down;
-.float rm_force;
-.float rm_damage;
-.float rm_edmg;
-#endif
-#endif
-#ifdef IMPLEMENTATION
REGISTER_NET_TEMP(TE_CSQC_VAPORBEAMPARTICLE)
}
#endif
-#endif
#pragma once
+
+CLASS(Vaporizer, Weapon)
+/* ammotype */ ATTRIB(Vaporizer, ammo_field, .int, ammo_cells);
+/* impulse */ ATTRIB(Vaporizer, impulse, int, 7);
+/* flags */ ATTRIB(Vaporizer, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
+/* rating */ ATTRIB(Vaporizer, bot_pickupbasevalue, float, 10000);
+/* color */ ATTRIB(Vaporizer, wpcolor, vector, '0.5 1 1');
+/* modelname */ ATTRIB(Vaporizer, mdl, string, "minstanex");
+#ifdef GAMEQC
+/* model */ ATTRIB(Vaporizer, m_model, Model, MDL_VAPORIZER_ITEM);
+#endif
+/* crosshair */ ATTRIB(Vaporizer, w_crosshair, string, "gfx/crosshairminstanex");
+/* crosshair */ ATTRIB(Vaporizer, w_crosshair_size, float, 0.6);
+/* reticle */ ATTRIB(Vaporizer, w_reticle, string, "gfx/reticle_nex");
+/* wepimg */ ATTRIB(Vaporizer, model2, string, "weaponminstanex");
+/* refname */ ATTRIB(Vaporizer, netname, string, "vaporizer");
+/* wepname */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, PRI) \
+ P(class, prefix, animtime, float, PRI) \
+ P(class, prefix, damage, float, PRI) \
+ P(class, prefix, refire, float, PRI) \
+ P(class, prefix, ammo, float, SEC) \
+ P(class, prefix, animtime, float, SEC) \
+ P(class, prefix, damage, float, SEC) \
+ P(class, prefix, delay, float, SEC) \
+ P(class, prefix, edgedamage, float, SEC) \
+ P(class, prefix, force, float, SEC) \
+ P(class, prefix, lifetime, float, SEC) \
+ P(class, prefix, radius, float, SEC) \
+ P(class, prefix, refire, float, SEC) \
+ P(class, prefix, shotangle, float, SEC) \
+ P(class, prefix, speed, float, SEC) \
+ P(class, prefix, spread, float, SEC) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Vaporizer, vaporizer)
+#undef X
+
+ENDCLASS(Vaporizer)
+REGISTER_WEAPON(VAPORIZER, vaporizer, NEW(Vaporizer));
+
+
+#ifdef SVQC
+.float vaporizer_lasthit;
+.float jump_interval;
+.float jump_interval2;
+.bool held_down;
+.float rm_force;
+.float rm_damage;
+.float rm_edmg;
+#endif
#include "vortex.qh"
-#ifndef IMPLEMENTATION
-CLASS(Vortex, Weapon)
-/* ammotype */ ATTRIB(Vortex, ammo_field, .int, ammo_cells);
-/* impulse */ ATTRIB(Vortex, impulse, int, 7);
-/* flags */ ATTRIB(Vortex, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
-/* rating */ ATTRIB(Vortex, bot_pickupbasevalue, float, 8000);
-/* color */ ATTRIB(Vortex, wpcolor, vector, '0.5 1 1');
-/* modelname */ ATTRIB(Vortex, mdl, string, "nex");
-#ifdef GAMEQC
-/* model */ ATTRIB(Vortex, m_model, Model, MDL_VORTEX_ITEM);
-#endif
-/* crosshair */ ATTRIB(Vortex, w_crosshair, string, "gfx/crosshairnex");
-/* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
-/* reticle */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
-/* wepimg */ ATTRIB(Vortex, model2, string, "weaponnex");
-/* refname */ ATTRIB(Vortex, netname, string, "vortex");
-/* wepname */ ATTRIB(Vortex, m_name, string, _("Vortex"));
-
-#define X(BEGIN, P, END, class, prefix) \
- BEGIN(class) \
- P(class, prefix, ammo, float, BOTH) \
- P(class, prefix, animtime, float, BOTH) \
- P(class, prefix, chargepool, float, SEC) \
- P(class, prefix, chargepool_pause_regen, float, SEC) \
- P(class, prefix, chargepool_regen, float, SEC) \
- P(class, prefix, charge, float, NONE) \
- P(class, prefix, charge_animlimit, float, NONE) \
- P(class, prefix, charge_limit, float, NONE) \
- P(class, prefix, charge_maxspeed, float, NONE) \
- P(class, prefix, charge_mindmg, float, NONE) \
- P(class, prefix, charge_minspeed, float, NONE) \
- P(class, prefix, charge_rate, float, NONE) \
- P(class, prefix, charge_rot_pause, float, NONE) \
- P(class, prefix, charge_rot_rate, float, NONE) \
- P(class, prefix, charge_shot_multiplier, float, NONE) \
- P(class, prefix, charge_start, float, NONE) \
- P(class, prefix, charge_velocity_rate, float, NONE) \
- P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
- P(class, prefix, damagefalloff_halflife, float, BOTH) \
- P(class, prefix, damagefalloff_maxdist, float, BOTH) \
- P(class, prefix, damagefalloff_mindist, float, BOTH) \
- P(class, prefix, damage, float, BOTH) \
- P(class, prefix, force, float, BOTH) \
- P(class, prefix, refire, float, BOTH) \
- P(class, prefix, secondary, float, NONE) \
- P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, Vortex, vortex)
-#undef X
-
-ENDCLASS(Vortex)
-REGISTER_WEAPON(VORTEX, vortex, NEW(Vortex));
-
-
-#ifdef SVQC
-
-.float vortex_lasthit;
-#endif
-#endif
-#ifdef IMPLEMENTATION
//REGISTER_STAT(WEP_CVAR_vortex_charge, bool, WEP_CVAR(vortex, charge))
//REGISTER_STAT(WEP_CVAR_vortex_charge_animlimit, float, WEP_CVAR(vortex, charge_animlimit))
}
#endif
-#endif
#pragma once
+
+CLASS(Vortex, Weapon)
+/* ammotype */ ATTRIB(Vortex, ammo_field, .int, ammo_cells);
+/* impulse */ ATTRIB(Vortex, impulse, int, 7);
+/* flags */ ATTRIB(Vortex, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
+/* rating */ ATTRIB(Vortex, bot_pickupbasevalue, float, 8000);
+/* color */ ATTRIB(Vortex, wpcolor, vector, '0.5 1 1');
+/* modelname */ ATTRIB(Vortex, mdl, string, "nex");
+#ifdef GAMEQC
+/* model */ ATTRIB(Vortex, m_model, Model, MDL_VORTEX_ITEM);
+#endif
+/* crosshair */ ATTRIB(Vortex, w_crosshair, string, "gfx/crosshairnex");
+/* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
+/* reticle */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
+/* wepimg */ ATTRIB(Vortex, model2, string, "weaponnex");
+/* refname */ ATTRIB(Vortex, netname, string, "vortex");
+/* wepname */ ATTRIB(Vortex, m_name, string, _("Vortex"));
+
+#define X(BEGIN, P, END, class, prefix) \
+ BEGIN(class) \
+ P(class, prefix, ammo, float, BOTH) \
+ P(class, prefix, animtime, float, BOTH) \
+ P(class, prefix, chargepool, float, SEC) \
+ P(class, prefix, chargepool_pause_regen, float, SEC) \
+ P(class, prefix, chargepool_regen, float, SEC) \
+ P(class, prefix, charge, float, NONE) \
+ P(class, prefix, charge_animlimit, float, NONE) \
+ P(class, prefix, charge_limit, float, NONE) \
+ P(class, prefix, charge_maxspeed, float, NONE) \
+ P(class, prefix, charge_mindmg, float, NONE) \
+ P(class, prefix, charge_minspeed, float, NONE) \
+ P(class, prefix, charge_rate, float, NONE) \
+ P(class, prefix, charge_rot_pause, float, NONE) \
+ P(class, prefix, charge_rot_rate, float, NONE) \
+ P(class, prefix, charge_shot_multiplier, float, NONE) \
+ P(class, prefix, charge_start, float, NONE) \
+ P(class, prefix, charge_velocity_rate, float, NONE) \
+ P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
+ P(class, prefix, damagefalloff_halflife, float, BOTH) \
+ P(class, prefix, damagefalloff_maxdist, float, BOTH) \
+ P(class, prefix, damagefalloff_mindist, float, BOTH) \
+ P(class, prefix, damage, float, BOTH) \
+ P(class, prefix, force, float, BOTH) \
+ P(class, prefix, refire, float, BOTH) \
+ P(class, prefix, secondary, float, NONE) \
+ P(class, prefix, reload_ammo, float, NONE) \
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, Vortex, vortex)
+#undef X
+
+ENDCLASS(Vortex)
+REGISTER_WEAPON(VORTEX, vortex, NEW(Vortex));
+
+
+#ifdef SVQC
+
+.float vortex_lasthit;
+#endif