#ifndef IMPLEMENTATION
-REGISTER_WEAPON(
-/* WEP_##id */ BLASTER,
-/* function */ W_Blaster,
-/* ammotype */ ammo_none,
-/* impulse */ 1,
-/* flags */ WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
-/* rating */ 0,
-/* color */ '1 0.5 0.5',
-/* modelname */ "laser",
-/* model */ MDL_BLASTER_ITEM,
-/* crosshair */ "gfx/crosshairlaser 0.5",
-/* wepimg */ "weaponlaser",
-/* refname */ "blaster",
-/* wepname */ _("Blaster")
-);
+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");
+#ifndef MENUQC
+/* 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, message, string, _("Blaster"));
+ENDCLASS(Blaster)
+REGISTER_WEAPON(BLASTER, NEW(Blaster));
#define BLASTER_SETTINGS(w_cvar,w_prop) BLASTER_SETTINGS_LIST(w_cvar, w_prop, BLASTER, blaster)
#define BLASTER_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
WITH(entity, self, missile, missile.think());
}
}
-bool W_Blaster(entity thiswep, int request)
-{SELFPARAM();
- switch(request)
- {
- case WR_AIM:
+
+ METHOD(Blaster, wr_aim, bool(entity thiswep))
{
if(WEP_CVAR(blaster, secondary))
{
return true;
}
- case WR_THINK:
+ METHOD(Blaster, wr_think, bool(entity thiswep))
{
if(self.BUTTON_ATCK)
{
return true;
}
- case WR_INIT:
+ METHOD(Blaster, wr_init, bool(entity thiswep))
{
BLASTER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
- case WR_SETUP:
+ METHOD(Blaster, wr_setup, bool(entity thiswep))
{
self.ammo_field = ammo_none;
return true;
}
- case WR_CHECKAMMO1:
- case WR_CHECKAMMO2:
+ METHOD(Blaster, wr_checkammo1, bool(entity thiswep))
{
- return true; // laser has infinite ammo
+ return true; // infinite ammo
}
- case WR_CONFIG:
+ METHOD(Blaster, wr_checkammo2, bool(entity thiswep))
+ {
+ return true; // blaster has infinite ammo
+ }
+
+ METHOD(Blaster, wr_config, bool(entity thiswep))
{
BLASTER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
return true;
}
- case WR_SUICIDEMESSAGE:
+ METHOD(Blaster, wr_suicidemessage, bool(entity thiswep))
{
return WEAPON_BLASTER_SUICIDE;
}
- case WR_KILLMESSAGE:
+ METHOD(Blaster, wr_killmessage, bool(entity thiswep))
{
return WEAPON_BLASTER_MURDER;
}
- }
- return false;
-}
+
#endif
#ifdef CSQC
-bool W_Blaster(entity thiswep, int request)
-{SELFPARAM();
- switch(request)
- {
- case WR_IMPACTEFFECT:
+
+ METHOD(Blaster, wr_impacteffect, bool(entity thiswep))
{
vector org2;
org2 = w_org + w_backoff * 6;
return true;
}
- case WR_INIT:
+ METHOD(Blaster, wr_init, bool(entity thiswep))
{
return true;
}
- case WR_ZOOMRETICLE:
+
+ METHOD(Blaster, wr_zoomreticle, bool(entity thiswep))
{
// no weapon specific image for this weapon
return false;
}
- }
- return false;
-}
+
#endif
#endif
#ifndef IMPLEMENTATION
-REGISTER_WEAPON(
-/* WEP_##id */ DEVASTATOR,
-/* function */ W_Devastator,
-/* ammotype */ ammo_rockets,
-/* impulse */ 9,
-/* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
-/* rating */ BOT_PICKUP_RATING_HIGH,
-/* color */ '1 1 0',
-/* modelname */ "rl",
-/* model */ MDL_DEVASTATOR_ITEM,
-/* crosshair */ "gfx/crosshairrocketlauncher 0.7",
-/* wepimg */ "weaponrocketlauncher",
-/* refname */ "devastator",
-/* wepname */ _("Devastator")
-);
+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);
+/* rating */ ATTRIB(Devastator, bot_pickupbasevalue, float, BOT_PICKUP_RATING_HIGH);
+/* color */ ATTRIB(Devastator, wpcolor, vector, '1 1 0');
+/* modelname */ ATTRIB(Devastator, mdl, string, "rl");
+#ifndef MENUQC
+/* 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, message, string, _("Devastator"));
+ENDCLASS(Devastator)
+REGISTER_WEAPON(DEVASTATOR, NEW(Devastator));
#define DEVASTATOR_SETTINGS(w_cvar,w_prop) DEVASTATOR_SETTINGS_LIST(w_cvar, w_prop, DEVASTATOR, devastator)
#define DEVASTATOR_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
MUTATOR_CALLHOOK(EditProjectile, self, missile);
}
-bool W_Devastator(entity thiswep, int req)
-{SELFPARAM();
- entity rock;
- float rockfound;
- float ammo_amount;
- switch(req)
- {
#if 0
- case WR_AIM:
+ METHOD(Devastator, wr_aim, bool(entity thiswep))
{
// aim and decide to fire if appropriate
self.BUTTON_ATCK = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
return true;
}
#else
- case WR_AIM:
+ METHOD(Devastator, wr_aim, bool(entity thiswep))
{
// aim and decide to fire if appropriate
self.BUTTON_ATCK = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
return true;
}
#endif
- case WR_THINK:
+ METHOD(Devastator, wr_think, bool(entity thiswep))
{
if(WEP_CVAR(devastator, reload_ammo) && self.clip_load < WEP_CVAR(devastator, ammo)) // forced reload
_WEP_ACTION(self.weapon, WR_RELOAD);
if(self.BUTTON_ATCK2)
if(self.switchweapon == WEP_DEVASTATOR.m_id)
{
- rockfound = 0;
+ entity rock;
+ bool rockfound = false;
for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.realowner == self)
{
if(!rock.rl_detonate_later)
{
rock.rl_detonate_later = true;
- rockfound = 1;
+ rockfound = true;
}
}
if(rockfound)
return true;
}
- case WR_INIT:
+ METHOD(Devastator, wr_init, bool(entity thiswep))
{
DEVASTATOR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
- case WR_SETUP:
+ METHOD(Devastator, wr_setup, bool(entity thiswep))
{
self.rl_release = 1;
return true;
}
- case WR_CHECKAMMO1:
+ METHOD(Devastator, wr_checkammo1, bool(entity thiswep))
{
#if 0
// don't switch while guiding a missile
return ammo_amount;
}
#else
- ammo_amount = self.WEP_AMMO(DEVASTATOR) >= WEP_CVAR(devastator, ammo);
+ float ammo_amount = self.WEP_AMMO(DEVASTATOR) >= WEP_CVAR(devastator, ammo);
ammo_amount += self.(weapon_load[WEP_DEVASTATOR.m_id]) >= WEP_CVAR(devastator, ammo);
return ammo_amount;
#endif
}
- case WR_CHECKAMMO2:
+ METHOD(Devastator, wr_checkammo2, bool(entity thiswep))
{
return false;
}
- case WR_CONFIG:
+ METHOD(Devastator, wr_config, bool(entity thiswep))
{
DEVASTATOR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
return true;
}
- case WR_RESETPLAYER:
+ METHOD(Devastator, wr_resetplayer, bool(entity thiswep))
{
self.rl_release = 0;
return true;
}
- case WR_RELOAD:
+ METHOD(Devastator, wr_reload, bool(entity thiswep))
{
W_Reload(WEP_CVAR(devastator, ammo), SND(RELOAD));
return true;
}
- case WR_SUICIDEMESSAGE:
+ METHOD(Devastator, wr_suicidemessage, bool(entity thiswep))
{
return WEAPON_DEVASTATOR_SUICIDE;
}
- case WR_KILLMESSAGE:
+ METHOD(Devastator, wr_killmessage, bool(entity thiswep))
{
if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
return WEAPON_DEVASTATOR_MURDER_SPLASH;
else
return WEAPON_DEVASTATOR_MURDER_DIRECT;
}
- }
- return false;
-}
+
#endif
#ifdef CSQC
-bool W_Devastator(entity thiswep, int req)
-{SELFPARAM();
- switch(req)
- {
- case WR_IMPACTEFFECT:
+
+ METHOD(Devastator, wr_impacteffect, bool(entity thiswep))
{
vector org2;
org2 = w_org + w_backoff * 12;
return true;
}
- case WR_INIT:
+ METHOD(Devastator, wr_init, bool(entity thiswep))
{
return true;
}
- case WR_ZOOMRETICLE:
+ METHOD(Devastator, wr_zoomreticle, bool(entity thiswep))
{
// no weapon specific image for this weapon
return false;
}
- }
- return false;
-}
+
#endif
#endif
#ifndef IMPLEMENTATION
-REGISTER_WEAPON(
-/* WEP_##id */ ELECTRO,
-/* function */ W_Electro,
-/* ammotype */ ammo_cells,
-/* impulse */ 5,
-/* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
-/* rating */ BOT_PICKUP_RATING_MID,
-/* color */ '0 0.5 1',
-/* modelname */ "electro",
-/* model */ MDL_ELECTRO_ITEM,
-/* crosshair */ "gfx/crosshairelectro 0.6",
-/* wepimg */ "weaponelectro",
-/* refname */ "electro",
-/* wepname */ _("Electro")
-);
+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, BOT_PICKUP_RATING_MID);
+/* color */ ATTRIB(Electro, wpcolor, vector, '0 0.5 1');
+/* modelname */ ATTRIB(Electro, mdl, string, "electro");
+#ifndef MENUQC
+/* 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, message, string, _("Electro"));
+ENDCLASS(Electro)
+REGISTER_WEAPON(ELECTRO, NEW(Electro));
#define ELECTRO_SETTINGS(w_cvar,w_prop) ELECTRO_SETTINGS_LIST(w_cvar, w_prop, ELECTRO, electro)
#define ELECTRO_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
}
.float bot_secondary_electromooth;
-bool W_Electro(entity thiswep, int req)
-{SELFPARAM();
- float ammo_amount;
- switch(req)
- {
- case WR_AIM:
+
+ METHOD(Electro, wr_aim, bool(entity thiswep))
{
self.BUTTON_ATCK = self.BUTTON_ATCK2 = false;
if(vlen(self.origin-self.enemy.origin) > 1000) { self.bot_secondary_electromooth = 0; }
return true;
}
- case WR_THINK:
+ METHOD(Electro, wr_think, bool(entity thiswep))
{
if(autocvar_g_balance_electro_reload_ammo) // forced reload // WEAPONTODO
{
- ammo_amount = 0;
+ float ammo_amount = 0;
if(self.clip_load >= WEP_CVAR_PRI(electro, ammo))
ammo_amount = 1;
if(self.clip_load >= WEP_CVAR_SEC(electro, ammo))
return true;
}
- case WR_INIT:
+ METHOD(Electro, wr_init, bool(entity thiswep))
{
ELECTRO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
- case WR_CHECKAMMO1:
+ METHOD(Electro, wr_checkammo1, bool(entity thiswep))
{
- ammo_amount = self.WEP_AMMO(ELECTRO) >= WEP_CVAR_PRI(electro, ammo);
+ float ammo_amount = self.WEP_AMMO(ELECTRO) >= WEP_CVAR_PRI(electro, ammo);
ammo_amount += self.(weapon_load[WEP_ELECTRO.m_id]) >= WEP_CVAR_PRI(electro, ammo);
return ammo_amount;
}
- case WR_CHECKAMMO2:
+ METHOD(Electro, wr_checkammo2, bool(entity thiswep))
{
+ float ammo_amount;
if(WEP_CVAR(electro, combo_safeammocheck)) // true if you can fire at least one secondary blob AND one primary shot after it, otherwise false.
{
ammo_amount = self.WEP_AMMO(ELECTRO) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
}
return ammo_amount;
}
- case WR_CONFIG:
+ METHOD(Electro, wr_config, bool(entity thiswep))
{
ELECTRO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
return true;
}
- case WR_RESETPLAYER:
+ METHOD(Electro, wr_resetplayer, bool(entity thiswep))
{
self.electro_secondarytime = time;
return true;
}
- case WR_RELOAD:
+ METHOD(Electro, wr_reload, bool(entity thiswep))
{
W_Reload(min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), SND(RELOAD));
return true;
}
- case WR_SUICIDEMESSAGE:
+ METHOD(Electro, wr_suicidemessage, bool(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_ELECTRO_SUICIDE_ORBS;
else
return WEAPON_ELECTRO_SUICIDE_BOLT;
}
- case WR_KILLMESSAGE:
+ METHOD(Electro, wr_killmessage, bool(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
{
return WEAPON_ELECTRO_MURDER_BOLT;
}
}
- }
- return false;
-}
+
#endif
#ifdef CSQC
-bool W_Electro(entity thiswep, int req)
-{SELFPARAM();
- switch(req)
- {
- case WR_IMPACTEFFECT:
+
+ METHOD(Electro, wr_impacteffect, bool(entity thiswep))
{
vector org2;
org2 = w_org + w_backoff * 6;
return true;
}
- case WR_INIT:
+ METHOD(Electro, wr_init, bool(entity thiswep))
{
return true;
}
- case WR_ZOOMRETICLE:
+ METHOD(Electro, wr_zoomreticle, bool(entity thiswep))
{
// no weapon specific image for this weapon
return false;
}
- }
- return false;
-}
+
#endif
#endif
#ifndef IMPLEMENTATION
-REGISTER_WEAPON(
-/* WEP_##id */ FIREBALL,
-/* function */ W_Fireball,
-/* ammotype */ ammo_none,
-/* impulse */ 9,
-/* flags */ WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH,
-/* rating */ BOT_PICKUP_RATING_MID,
-/* color */ '1 0.5 0',
-/* modelname */ "fireball",
-/* model */ MDL_FIREBALL_ITEM,
-/* crosshair */ "gfx/crosshairfireball",
-/* wepimg */ "weaponfireball",
-/* refname */ "fireball",
-/* wepname */ _("Fireball")
-);
+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);
+/* rating */ ATTRIB(Fireball, bot_pickupbasevalue, float, BOT_PICKUP_RATING_MID);
+/* color */ ATTRIB(Fireball, wpcolor, vector, '1 0.5 0');
+/* modelname */ ATTRIB(Fireball, mdl, string, "fireball");
+#ifndef MENUQC
+/* 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, message, string, _("Fireball"));
+ENDCLASS(Fireball)
+REGISTER_WEAPON(FIREBALL, NEW(Fireball));
#define FIREBALL_SETTINGS(w_cvar,w_prop) FIREBALL_SETTINGS_LIST(w_cvar, w_prop, FIREBALL, fireball)
#define FIREBALL_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
MUTATOR_CALLHOOK(EditProjectile, self, proj);
}
-bool W_Fireball(entity thiswep, int req)
-{SELFPARAM();
- switch(req)
- {
- case WR_AIM:
+ METHOD(Fireball, wr_aim, bool(entity thiswep))
{
self.BUTTON_ATCK = false;
self.BUTTON_ATCK2 = false;
return true;
}
- case WR_THINK:
+ METHOD(Fireball, wr_think, bool(entity thiswep))
{
if(self.BUTTON_ATCK)
{
return true;
}
- case WR_INIT:
+ METHOD(Fireball, wr_init, bool(entity thiswep))
{
FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
- case WR_SETUP:
+ METHOD(Fireball, wr_setup, bool(entity thiswep))
{
self.ammo_field = ammo_none;
return true;
}
- case WR_CHECKAMMO1:
- case WR_CHECKAMMO2:
+ METHOD(Fireball, wr_checkammo1, bool(entity thiswep))
+ {
+ return true; // infinite ammo
+ }
+ METHOD(Fireball, wr_checkammo2, bool(entity thiswep))
{
return true; // fireball has infinite ammo
}
- case WR_CONFIG:
+ METHOD(Fireball, wr_config, bool(entity thiswep))
{
FIREBALL_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
return true;
}
- case WR_RESETPLAYER:
+ METHOD(Fireball, wr_resetplayer, bool(entity thiswep))
{
self.fireball_primarytime = time;
return true;
}
- case WR_SUICIDEMESSAGE:
+ METHOD(Fireball, wr_suicidemessage, bool(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_FIREBALL_SUICIDE_FIREMINE;
else
return WEAPON_FIREBALL_SUICIDE_BLAST;
}
- case WR_KILLMESSAGE:
+ METHOD(Fireball, wr_killmessage, bool(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_FIREBALL_MURDER_FIREMINE;
else
return WEAPON_FIREBALL_MURDER_BLAST;
}
- }
- return false;
-}
+
#endif
#ifdef CSQC
-bool W_Fireball(entity thiswep, int req)
-{SELFPARAM();
- switch(req)
- {
- case WR_IMPACTEFFECT:
+
+ METHOD(Fireball, wr_impacteffect, bool(entity thiswep))
{
vector org2;
if(w_deathtype & HITTYPE_SECONDARY)
return true;
}
- case WR_INIT:
+ METHOD(Fireball, wr_init, bool(entity thiswep))
{
return true;
}
- case WR_ZOOMRETICLE:
+ METHOD(Fireball, wr_zoomreticle, bool(entity thiswep))
{
// no weapon specific image for this weapon
return false;
}
- }
- return false;
-}
+
#endif
#endif
#ifndef IMPLEMENTATION
-REGISTER_WEAPON(
-/* WEP_##id */ HAGAR,
-/* function */ W_Hagar,
-/* ammotype */ ammo_rockets,
-/* impulse */ 8,
-/* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
-/* rating */ BOT_PICKUP_RATING_MID,
-/* color */ '1 1 0.5',
-/* modelname */ "hagar",
-/* model */ MDL_HAGAR_ITEM,
-/* crosshair */ "gfx/crosshairhagar 0.8",
-/* wepimg */ "weaponhagar",
-/* refname */ "hagar",
-/* wepname */ _("Hagar")
-);
+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, BOT_PICKUP_RATING_MID);
+/* color */ ATTRIB(Hagar, wpcolor, vector, '1 1 0.5');
+/* modelname */ ATTRIB(Hagar, mdl, string, "hagar");
+#ifndef MENUQC
+/* 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, message, string, _("Hagar"));
+ENDCLASS(Hagar)
+REGISTER_WEAPON(HAGAR, NEW(Hagar));
#define HAGAR_SETTINGS(w_cvar,w_prop) HAGAR_SETTINGS_LIST(w_cvar, w_prop, HAGAR, hagar)
#define HAGAR_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
}
}
-bool W_Hagar(entity thiswep, int req)
-{SELFPARAM();
- float ammo_amount;
- switch(req)
- {
- case WR_AIM:
+ METHOD(Hagar, wr_aim, bool(entity thiswep))
{
if(random()>0.15)
self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false);
return true;
}
- case WR_THINK:
+ METHOD(Hagar, wr_think, bool(entity thiswep))
{
float loadable_secondary;
loadable_secondary = (WEP_CVAR_SEC(hagar, load) && WEP_CVAR(hagar, secondary));
}
return true;
}
- case WR_GONETHINK:
+ METHOD(Hagar, wr_gonethink, bool(entity thiswep))
{
// we lost the weapon and want to prepare switching away
if(self.hagar_load)
return true;
}
- case WR_INIT:
+ METHOD(Hagar, wr_init, bool(entity thiswep))
{
HAGAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
- case WR_SETUP:
+ METHOD(Hagar, wr_setup, bool(entity thiswep))
{
self.hagar_loadblock = false;
return true;
}
- case WR_CHECKAMMO1:
+ METHOD(Hagar, wr_checkammo1, bool(entity thiswep))
{
- ammo_amount = self.WEP_AMMO(HAGAR) >= WEP_CVAR_PRI(hagar, ammo);
+ float ammo_amount = self.WEP_AMMO(HAGAR) >= WEP_CVAR_PRI(hagar, ammo);
ammo_amount += self.(weapon_load[WEP_HAGAR.m_id]) >= WEP_CVAR_PRI(hagar, ammo);
return ammo_amount;
}
- case WR_CHECKAMMO2:
+ METHOD(Hagar, wr_checkammo2, bool(entity thiswep))
{
- ammo_amount = self.WEP_AMMO(HAGAR) >= WEP_CVAR_SEC(hagar, ammo);
+ float ammo_amount = self.WEP_AMMO(HAGAR) >= WEP_CVAR_SEC(hagar, ammo);
ammo_amount += self.(weapon_load[WEP_HAGAR.m_id]) >= WEP_CVAR_SEC(hagar, ammo);
return ammo_amount;
}
- case WR_CONFIG:
+ METHOD(Hagar, wr_config, bool(entity thiswep))
{
HAGAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
return true;
}
- case WR_RESETPLAYER:
+ METHOD(Hagar, wr_resetplayer, bool(entity thiswep))
{
self.hagar_load = 0;
return true;
}
- case WR_PLAYERDEATH:
+ METHOD(Hagar, wr_playerdeath, bool(entity thiswep))
{
// if we have any rockets loaded when we die, release them
if(self.hagar_load && WEP_CVAR_SEC(hagar, load_releasedeath))
return true;
}
- case WR_RELOAD:
+ METHOD(Hagar, wr_reload, bool(entity thiswep))
{
if(!self.hagar_load) // require releasing loaded rockets first
W_Reload(min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), SND(RELOAD));
return true;
}
- case WR_SUICIDEMESSAGE:
+ METHOD(Hagar, wr_suicidemessage, bool(entity thiswep))
{
return WEAPON_HAGAR_SUICIDE;
}
- case WR_KILLMESSAGE:
+ METHOD(Hagar, wr_killmessage, bool(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_HAGAR_MURDER_BURST;
else
return WEAPON_HAGAR_MURDER_SPRAY;
}
- }
- return false;
-}
+
#endif
#ifdef CSQC
-bool W_Hagar(entity thiswep, int req)
-{SELFPARAM();
- switch(req)
- {
- case WR_IMPACTEFFECT:
+
+ METHOD(Hagar, wr_impacteffect, bool(entity thiswep))
{
vector org2;
org2 = w_org + w_backoff * 6;
return true;
}
- case WR_INIT:
+ METHOD(Hagar, wr_init, bool(entity thiswep))
{
return true;
}
- case WR_ZOOMRETICLE:
+ METHOD(Hagar, wr_zoomreticle, bool(entity thiswep))
{
// no weapon specific image for this weapon
return false;
}
- }
- return false;
-}
+
#endif
#endif
#ifndef IMPLEMENTATION
-REGISTER_WEAPON(
-/* WEP_##id */ TUBA,
-/* function */ W_Tuba,
-/* ammotype */ ammo_none,
-/* impulse */ 1,
-/* flags */ WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH,
-/* rating */ BOT_PICKUP_RATING_MID,
-/* color */ '0 1 0',
-/* modelname */ "tuba",
-/* model */ MDL_TUBA_ITEM,
-/* crosshair */ "gfx/crosshairtuba",
-/* wepimg */ "weapontuba",
-/* refname */ "tuba",
+CLASS(Tuba, Weapon)
+/* ammotype */ //ATTRIB(Tuba, ammo_field, .int, ammo_none)
+/* impulse */ ATTRIB(Tuba, impulse, int, 1)
+/* flags */ ATTRIB(Tuba, spawnflags, int, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH);
+/* rating */ ATTRIB(Tuba, bot_pickupbasevalue, float, BOT_PICKUP_RATING_MID);
+/* color */ ATTRIB(Tuba, wpcolor, vector, '0 1 0');
+/* modelname */ ATTRIB(Tuba, mdl, string, "tuba");
+#ifndef MENUQC
+/* 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 */ _("@!#%'n Tuba")
-);
+/* wepname */ ATTRIB(Tuba, message, string, _("@!#%'n Tuba"));
+ENDCLASS(Tuba)
+REGISTER_WEAPON(TUBA, NEW(Tuba));
#define TUBA_SETTINGS(w_cvar,w_prop) TUBA_SETTINGS_LIST(w_cvar, w_prop, TUBA, tuba)
#define TUBA_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
}
}
-bool W_Tuba(entity thiswep, int req)
-{SELFPARAM();
- switch(req)
- {
- case WR_AIM:
+ METHOD(Tuba, wr_aim, bool(entity thiswep))
{
// bots cannot play the Tuba well yet
// I think they should start with the recorder first
return true;
}
- case WR_THINK:
+ METHOD(Tuba, wr_think, bool(entity thiswep))
{
if(self.BUTTON_ATCK)
if(weapon_prepareattack(0, WEP_CVAR(tuba, refire)))
return true;
}
- case WR_INIT:
+ METHOD(Tuba, wr_init, bool(entity thiswep))
{
TUBA_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
- case WR_SETUP:
+ METHOD(Tuba, wr_setup, bool(entity thiswep))
{
self.ammo_field = ammo_none;
self.tuba_instrument = 0;
return true;
}
- case WR_RELOAD:
+ METHOD(Tuba, wr_reload, bool(entity thiswep))
{
// switch to alternate instruments :)
if(self.weaponentity.state == WS_READY)
return true;
}
- case WR_CHECKAMMO1:
- case WR_CHECKAMMO2:
+ METHOD(Tuba, wr_checkammo1, bool(entity thiswep))
+ {
+ return true; // infinite ammo
+ }
+ METHOD(Tuba, wr_checkammo2, bool(entity thiswep))
{
return true; // tuba has infinite ammo
}
- case WR_CONFIG:
+ METHOD(Tuba, wr_config, bool(entity thiswep))
{
TUBA_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
return true;
}
- case WR_SUICIDEMESSAGE:
+ METHOD(Tuba, wr_suicidemessage, bool(entity thiswep))
{
if(w_deathtype & HITTYPE_BOUNCE)
return WEAPON_KLEINBOTTLE_SUICIDE;
else
return WEAPON_TUBA_SUICIDE;
}
- case WR_KILLMESSAGE:
+ METHOD(Tuba, wr_killmessage, bool(entity thiswep))
{
if(w_deathtype & HITTYPE_BOUNCE)
return WEAPON_KLEINBOTTLE_MURDER;
else
return WEAPON_TUBA_MURDER;
}
- }
- return false;
-}
+
#endif
#ifdef CSQC
-bool W_Tuba(entity thiswep, int req)
-{SELFPARAM();
- // nothing to do here; particles of tuba are handled differently
- // WEAPONTODO
- switch(req)
- {
- case WR_ZOOMRETICLE:
+ METHOD(Tuba, wr_zoomreticle, bool(entity thiswep))
{
// no weapon specific image for this weapon
return false;
}
- }
- return false;
-}
#endif
#endif
#ifndef IMPLEMENTATION
-REGISTER_WEAPON(
-/* WEP_##id */ VAPORIZER,
-/* function */ W_Vaporizer,
-/* ammotype */ ammo_cells,
-/* impulse */ 7,
-/* flags */ WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN,
-/* rating */ BOT_PICKUP_RATING_HIGH,
-/* color */ '0.5 1 1',
-/* modelname */ "minstanex",
-/* model */ MDL_VAPORIZER_ITEM,
-/* crosshair */ "gfx/crosshairminstanex 0.6",
-/* wepimg */ "weaponminstanex",
-/* refname */ "vaporizer",
-/* wepname */ _("Vaporizer")
-);
+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);
+/* rating */ ATTRIB(Vaporizer, bot_pickupbasevalue, float, BOT_PICKUP_RATING_HIGH);
+/* color */ ATTRIB(Vaporizer, wpcolor, vector, '0.5 1 1');
+/* modelname */ ATTRIB(Vaporizer, mdl, string, "minstanex");
+#ifndef MENUQC
+/* 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);
+/* wepimg */ ATTRIB(Vaporizer, model2, string, "weaponminstanex");
+/* refname */ ATTRIB(Vaporizer, netname, string, "vaporizer");
+/* wepname */ ATTRIB(Vaporizer, message, string, _("Vaporizer"));
+ENDCLASS(Vaporizer)
+REGISTER_WEAPON(VAPORIZER, NEW(Vaporizer));
#define VAPORIZER_SETTINGS(w_cvar,w_prop) VAPORIZER_SETTINGS_LIST(w_cvar, w_prop, VAPORIZER, vaporizer)
#define VAPORIZER_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
}
}
-float W_Vaporizer(entity thiswep, float req)
-{SELFPARAM();
- float ammo_amount;
- float vaporizer_ammo;
- float rapid = autocvar_g_rm_laser_rapid;
-
- // now multiple WR_s use this
- vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
-
- switch(req)
- {
- case WR_AIM:
+ METHOD(Vaporizer, wr_aim, bool(entity thiswep))
{
if(self.WEP_AMMO(VAPORIZER) > 0)
self.BUTTON_ATCK = bot_aim(1000000, 0, 1, false);
return true;
}
- case WR_THINK:
+ METHOD(Vaporizer, wr_think, bool(entity thiswep))
{
+ float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
// if the laser uses load, we also consider its ammo for reloading
if(WEP_CVAR(vaporizer, reload_ammo) && WEP_CVAR_SEC(vaporizer, ammo) && self.clip_load < min(vaporizer_ammo, WEP_CVAR_SEC(vaporizer, ammo))) // forced reload
_WEP_ACTION(self.weapon, WR_RELOAD);
{
if((autocvar_g_rm && autocvar_g_rm_laser) || autocvar_g_rm_laser == 2)
{
+ bool rapid = autocvar_g_rm_laser_rapid;
if(self.jump_interval <= time && !self.held_down)
{
if(rapid)
return true;
}
- case WR_INIT:
+ METHOD(Vaporizer, wr_init, bool(entity thiswep))
{
//W_Blaster(WR_INIT); // Samual: Is this really the proper thing to do? Didn't we already run this previously?
VAPORIZER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
- case WR_SETUP:
+ METHOD(Vaporizer, wr_setup, bool(entity thiswep))
{
self.ammo_field = WEP_AMMO(VAPORIZER);
self.vaporizer_lasthit = 0;
return true;
}
- case WR_CHECKAMMO1:
+ METHOD(Vaporizer, wr_checkammo1, bool(entity thiswep))
{
- ammo_amount = self.WEP_AMMO(VAPORIZER) >= vaporizer_ammo;
+ float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
+ float ammo_amount = self.WEP_AMMO(VAPORIZER) >= vaporizer_ammo;
ammo_amount += self.(weapon_load[WEP_VAPORIZER.m_id]) >= vaporizer_ammo;
return ammo_amount;
}
- case WR_CHECKAMMO2:
+ METHOD(Vaporizer, wr_checkammo2, bool(entity thiswep))
{
if(!WEP_CVAR_SEC(vaporizer, ammo))
return true;
- ammo_amount = self.WEP_AMMO(VAPORIZER) >= WEP_CVAR_SEC(vaporizer, ammo);
+ float ammo_amount = self.WEP_AMMO(VAPORIZER) >= WEP_CVAR_SEC(vaporizer, ammo);
ammo_amount += self.(weapon_load[WEP_VAPORIZER.m_id]) >= WEP_CVAR_SEC(vaporizer, ammo);
return ammo_amount;
}
- case WR_CONFIG:
+ METHOD(Vaporizer, wr_config, bool(entity thiswep))
{
VAPORIZER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
return true;
}
- case WR_RESETPLAYER:
+ METHOD(Vaporizer, wr_resetplayer, bool(entity thiswep))
{
self.vaporizer_lasthit = 0;
return true;
}
- case WR_RELOAD:
+ METHOD(Vaporizer, wr_reload, bool(entity thiswep))
{
+ float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
float used_ammo;
if(WEP_CVAR_SEC(vaporizer, ammo))
used_ammo = min(vaporizer_ammo, WEP_CVAR_SEC(vaporizer, ammo));
W_Reload(used_ammo, SND(RELOAD));
return true;
}
- case WR_SUICIDEMESSAGE:
+ METHOD(Vaporizer, wr_suicidemessage, bool(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- case WR_KILLMESSAGE:
+ METHOD(Vaporizer, wr_killmessage, bool(entity thiswep))
{
return WEAPON_VAPORIZER_MURDER;
}
- }
- return false;
-}
+
#endif
#ifdef CSQC
-float W_Vaporizer(entity thiswep, float req)
-{SELFPARAM();
- switch(req)
- {
- case WR_IMPACTEFFECT:
+
+ METHOD(Vaporizer, wr_impacteffect, bool(entity thiswep))
{
vector org2 = w_org + w_backoff * 6;
if(w_deathtype & HITTYPE_SECONDARY)
}
return true;
}
- case WR_INIT:
+ METHOD(Vaporizer, wr_init, bool(entity thiswep))
{
if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
{
}
return true;
}
- case WR_ZOOMRETICLE:
+ METHOD(Vaporizer, wr_zoomreticle, bool(entity thiswep))
{
if(button_zoom || zoomscript_caught)
{
return false;
}
}
- }
- return false;
-}
+
#endif
#endif
#ifndef IMPLEMENTATION
-REGISTER_WEAPON(
-/* WEP_##id */ VORTEX,
-/* function */ W_Vortex,
-/* ammotype */ ammo_cells,
-/* impulse */ 7,
-/* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN,
-/* rating */ BOT_PICKUP_RATING_HIGH,
-/* color */ '0.5 1 1',
-/* modelname */ "nex",
-/* model */ MDL_VORTEX_ITEM,
-/* crosshair */ "gfx/crosshairnex 0.65",
-/* wepimg */ "weaponnex",
-/* refname */ "vortex",
-/* wepname */ _("Vortex")
-);
+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);
+/* rating */ ATTRIB(Vortex, bot_pickupbasevalue, float, BOT_PICKUP_RATING_HIGH);
+/* color */ ATTRIB(Vortex, wpcolor, vector, '0.5 1 1');
+/* modelname */ ATTRIB(Vortex, mdl, string, "nex");
+#ifndef MENUQC
+/* 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);
+/* wepimg */ ATTRIB(Vortex, model2, string, "weaponnex");
+/* refname */ ATTRIB(Vortex, netname, string, "vortex");
+/* wepname */ ATTRIB(Vortex, message, string, _("Vortex"));
+ENDCLASS(Vortex)
+REGISTER_WEAPON(VORTEX, NEW(Vortex));
#define VORTEX_SETTINGS(w_cvar,w_prop) VORTEX_SETTINGS_LIST(w_cvar, w_prop, VORTEX, vortex)
#define VORTEX_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
W_DecreaseAmmo(myammo);
}
-void spawnfunc_weapon_vortex(void); // defined in t_items.qc
-
.float vortex_chargepool_pauseregen_finished;
-bool W_Vortex(entity thiswep, int req)
-{SELFPARAM();
- float dt;
- float ammo_amount;
- switch(req)
- {
- case WR_AIM:
+
+ METHOD(Vortex, wr_aim, bool(entity thiswep))
{
if(bot_aim(1000000, 0, 1, false))
self.BUTTON_ATCK = true;
}
return true;
}
- case WR_THINK:
+ METHOD(Vortex, wr_think, bool(entity thiswep))
{
if(WEP_CVAR(vortex, charge) && self.vortex_charge < WEP_CVAR(vortex, charge_limit))
self.vortex_charge = min(1, self.vortex_charge + WEP_CVAR(vortex, charge_rate) * frametime / W_TICSPERFRAME);
if(WEP_CVAR(vortex, charge))
{
self.vortex_charge_rottime = time + WEP_CVAR(vortex, charge_rot_pause);
- dt = frametime / W_TICSPERFRAME;
+ float dt = frametime / W_TICSPERFRAME;
if(self.vortex_charge < 1)
{
return true;
}
- case WR_INIT:
+ METHOD(Vortex, wr_init, bool(entity thiswep))
{
VORTEX_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
- case WR_SETUP:
+ METHOD(Vortex, wr_setup, bool(entity thiswep))
{
self.vortex_lasthit = 0;
return true;
}
- case WR_CHECKAMMO1:
+ METHOD(Vortex, wr_checkammo1, bool(entity thiswep))
{
- ammo_amount = self.WEP_AMMO(VORTEX) >= WEP_CVAR_PRI(vortex, ammo);
+ float ammo_amount = self.WEP_AMMO(VORTEX) >= WEP_CVAR_PRI(vortex, ammo);
ammo_amount += (autocvar_g_balance_vortex_reload_ammo && self.(weapon_load[WEP_VORTEX.m_id]) >= WEP_CVAR_PRI(vortex, ammo));
return ammo_amount;
}
- case WR_CHECKAMMO2:
+ METHOD(Vortex, wr_checkammo2, bool(entity thiswep))
{
if(WEP_CVAR(vortex, secondary))
{
// don't allow charging if we don't have enough ammo
- ammo_amount = self.WEP_AMMO(VORTEX) >= WEP_CVAR_SEC(vortex, ammo);
+ float ammo_amount = self.WEP_AMMO(VORTEX) >= WEP_CVAR_SEC(vortex, ammo);
ammo_amount += self.(weapon_load[WEP_VORTEX.m_id]) >= WEP_CVAR_SEC(vortex, ammo);
return ammo_amount;
}
return false; // zoom is not a fire mode
}
}
- case WR_CONFIG:
+ METHOD(Vortex, wr_config, bool(entity thiswep))
{
VORTEX_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
return true;
}
- case WR_RESETPLAYER:
+ METHOD(Vortex, wr_resetplayer, bool(entity thiswep))
{
self.vortex_lasthit = 0;
return true;
}
- case WR_RELOAD:
+ METHOD(Vortex, wr_reload, bool(entity thiswep))
{
W_Reload(min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), SND(RELOAD));
return true;
}
- case WR_SUICIDEMESSAGE:
+ METHOD(Vortex, wr_suicidemessage, bool(entity thiswep))
{
return WEAPON_THINKING_WITH_PORTALS;
}
- case WR_KILLMESSAGE:
+ METHOD(Vortex, wr_killmessage, bool(entity thiswep))
{
return WEAPON_VORTEX_MURDER;
}
- }
- return false;
-}
+
#endif
#ifdef CSQC
float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO
-bool W_Vortex(entity thiswep, int req)
-{SELFPARAM();
- switch(req)
- {
- case WR_IMPACTEFFECT:
+
+ METHOD(Vortex, wr_impacteffect, bool(entity thiswep))
{
vector org2;
org2 = w_org + w_backoff * 6;
return true;
}
- case WR_INIT:
+ METHOD(Vortex, wr_init, bool(entity thiswep))
{
if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
{
}
return true;
}
- case WR_ZOOMRETICLE:
+ METHOD(Vortex, wr_zoomreticle, bool(entity thiswep))
{
if(button_zoom || zoomscript_caught || (!WEP_CVAR(vortex, secondary) && button_attack2))
{
return false;
}
}
- }
- return false;
-}
+
#endif
#endif