set g_balance_porto_weaponstartoverride -1
// }}}
// {{{ #13: Vaporizer
-set g_balance_minstanex_primary_ammo 10
-set g_balance_minstanex_primary_animtime 0.3
-set g_balance_minstanex_primary_refire 1
-set g_balance_minstanex_reload_ammo 0
-set g_balance_minstanex_reload_time 0
-set g_balance_minstanex_secondary_ammo 0
-set g_balance_minstanex_secondary_animtime 0.3
-set g_balance_minstanex_secondary_damage 0
-set g_balance_minstanex_secondary_delay 0
-set g_balance_minstanex_secondary_edgedamage 0
-set g_balance_minstanex_secondary_force 300
-set g_balance_minstanex_secondary_lifetime 5
-set g_balance_minstanex_secondary_radius 70
-set g_balance_minstanex_secondary_refire 0.7
-set g_balance_minstanex_secondary_shotangle 0
-set g_balance_minstanex_secondary_speed 6000
-set g_balance_minstanex_secondary_spread 0
-set g_balance_minstanex_switchdelay_drop 0.2
-set g_balance_minstanex_switchdelay_raise 0.2
-set g_balance_minstanex_weaponreplace ""
-set g_balance_minstanex_weaponstart 0
-set g_balance_minstanex_weaponstartoverride -1
+set g_balance_vaporizer_primary_ammo 10
+set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_refire 1
+set g_balance_vaporizer_reload_ammo 0
+set g_balance_vaporizer_reload_time 0
+set g_balance_vaporizer_secondary_ammo 0
+set g_balance_vaporizer_secondary_animtime 0.3
+set g_balance_vaporizer_secondary_damage 0
+set g_balance_vaporizer_secondary_delay 0
+set g_balance_vaporizer_secondary_edgedamage 0
+set g_balance_vaporizer_secondary_force 300
+set g_balance_vaporizer_secondary_lifetime 5
+set g_balance_vaporizer_secondary_radius 70
+set g_balance_vaporizer_secondary_refire 0.7
+set g_balance_vaporizer_secondary_shotangle 0
+set g_balance_vaporizer_secondary_speed 6000
+set g_balance_vaporizer_secondary_spread 0
+set g_balance_vaporizer_switchdelay_drop 0.2
+set g_balance_vaporizer_switchdelay_raise 0.2
+set g_balance_vaporizer_weaponreplace ""
+set g_balance_vaporizer_weaponstart 0
+set g_balance_vaporizer_weaponstartoverride -1
// }}}
// {{{ #14: Grappling Hook
set g_balance_hook_primary_ammo 5
set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_devastator -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
-set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_vaporizer -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
case WEP_MORTAR: // toss curve
return SHOTTYPE_HITWORLD;
case WEP_NEX:
- case WEP_MINSTANEX:
+ case WEP_VAPORIZER:
mv = MOVE_NORMAL;
break;
case WEP_RIFLE:
// the view to go back to normal, so reticle_type would become 0 as we fade out)
if(spectatee_status || is_dead || hud != HUD_NORMAL)
reticle_type = 0; // prevent reticle from showing during the respawn zoom effect or for spectators
- else if((activeweapon == WEP_NEX || activeweapon == WEP_RIFLE || activeweapon == WEP_MINSTANEX) && (button_zoom || zoomscript_caught))
+ else if((activeweapon == WEP_NEX || activeweapon == WEP_RIFLE || activeweapon == WEP_VAPORIZER) && (button_zoom || zoomscript_caught))
reticle_type = 2; // nex zoom
else if(button_zoom || zoomscript_caught)
reticle_type = 1; // normal zoom
w_random = prandom();
traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
- if(trace_fraction < 1 && hitwep != WEP_NEX && hitwep != WEP_MINSTANEX)
+ if(trace_fraction < 1 && hitwep != WEP_NEX && hitwep != WEP_VAPORIZER)
w_backoff = trace_plane_normal;
else
w_backoff = -1 * normalize(force);
case WEP_ELECTRO: return 3;
case WEP_CRYLINK: return 3;
case WEP_HLAC: return 3;
- case WEP_MINSTANEX: return 3;
+ case WEP_VAPORIZER: return 3;
case WEP_NEX: return 3;
case WEP_RIFLE: return 1;
case WEP_HAGAR: return 2;
vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
{
float i;
- float weapon_cnt = WEP_COUNT - 3; // either minstanex/nex are hidden, no port-o-launch, no tuba
+ float weapon_cnt = WEP_COUNT - 3; // either vaporizer/nex are hidden, no port-o-launch, no tuba
float rows;
if(autocvar_scoreboard_accuracy_doublerows)
rows = 2;
if(rows == 2)
pos_x += weapon_width / 2;
- if(switchweapon == WEP_MINSTANEX)
+ if(switchweapon == WEP_VAPORIZER)
g_minstagib = 1; // TODO: real detection for minstagib?
float weapon_stats;
self = get_weaponinfo(i);
if (!self.weapon)
continue;
- if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || minstanex and tuba
+ if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_VAPORIZER && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || vaporizer and tuba
continue;
weapon_stats = weapon_accuracy[i-WEP_FIRST];
case "wpn-hagar": return '1 1 0.5';
case "wpn-rl": return '1 1 0';
case "wpn-porto": return '0.5 0.5 0.5';
- case "wpn-minstanex": return '0.5 1 1';
+ case "wpn-vaporizer": return '0.5 1 1';
case "wpn-hookgun": return '0 0.5 0';
case "wpn-fireball": return '1 0.5 0';
case "wpn-hlac": return '0 1 0';
case "wpn-hagar": return _("Hagar");
case "wpn-rl": return _("Rocket Launcher");
case "wpn-porto": return _("Port-O-Launch");
- case "wpn-minstanex": return _("Minstanex");
+ case "wpn-vaporizer": return _("Vaporizer");
case "wpn-hookgun": return _("Hook");
case "wpn-fireball": return _("Fireball");
case "wpn-hlac": return _("HLAC");
MSG_INFO_NOTIF(1, INFO_WEAPON_LASER_SUICIDE, 2, 1, "s1 s2loc spree_lost", "s1", "weaponlaser", _("^BG%s^K1 shot themself to hell with their Laser%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponminelayer", _("^BG%s%s^K1 got too close to ^BG%s^K1's mine%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_SUICIDE, 2, 1, "s1 s2loc spree_lost", "s1", "weaponminelayer", _("^BG%s^K1 forgot about their mine%s%s"), "") \
- MSG_INFO_NOTIF(1, INFO_WEAPON_MINSTANEX_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponminstanex", _("^BG%s%s^K1 has been vaporized by ^BG%s^K1's Minstanex%s%s"), "") \
+ MSG_INFO_NOTIF(1, INFO_WEAPON_VAPORIZER_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponminstanex", _("^BG%s%s^K1 has been sublimated by ^BG%s^K1's Vaporizer%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_BOUNCE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weapongrenadelauncher", _("^BG%s%s^K1 got too close to ^BG%s^K1's Mortar grenade%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_EXPLODE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weapongrenadelauncher", _("^BG%s%s^K1 ate ^BG%s^K1's Mortar grenade%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_SUICIDE_BOUNCE, 2, 1, "s1 s2loc spree_lost", "s1", "weapongrenadelauncher", _("^BG%s^K1 didn't see their own Mortar grenade%s%s"), "") \
MSG_MULTI_NOTIF(1, WEAPON_LASER_SUICIDE, NO_MSG, INFO_WEAPON_LASER_SUICIDE, CENTER_DEATH_SELF_GENERIC) \
MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_MURDER, NO_MSG, INFO_WEAPON_MINELAYER_MURDER, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_SUICIDE, NO_MSG, INFO_WEAPON_MINELAYER_SUICIDE, CENTER_DEATH_SELF_GENERIC) \
- MSG_MULTI_NOTIF(1, WEAPON_MINSTANEX_MURDER, NO_MSG, INFO_WEAPON_MINSTANEX_MURDER, NO_MSG) \
+ MSG_MULTI_NOTIF(1, WEAPON_VAPORIZER_MURDER, NO_MSG, INFO_WEAPON_VAPORIZER_MURDER, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_MORTAR_MURDER_BOUNCE, NO_MSG, INFO_WEAPON_MORTAR_MURDER_BOUNCE, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_MORTAR_MURDER_EXPLODE, NO_MSG, INFO_WEAPON_MORTAR_MURDER_EXPLODE, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_MORTAR_SUICIDE_BOUNCE, NO_MSG, INFO_WEAPON_MORTAR_SUICIDE_BOUNCE, CENTER_DEATH_SELF_GENERIC) \
// other weapons
#include "w_porto.qc"
-#include "w_minstanex.qc"
+#include "w_vaporizer.qc"
#include "w_hook.qc"
#include "w_hlac.qc"
#include "w_tuba.qc"
+++ /dev/null
-#ifdef REGISTER_WEAPON
-REGISTER_WEAPON(
-/* WEP_##id */ MINSTANEX,
-/* function */ w_minstanex,
-/* ammotype */ ammo_cells,
-/* impulse */ 7,
-/* flags */ WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN,
-/* rating */ BOT_PICKUP_RATING_HIGH,
-/* model */ "minstanex",
-/* netname */ "minstanex",
-/* fullname */ _("Vaporizer")
-);
-
-#define MINSTANEX_SETTINGS(w_cvar,w_prop) MINSTANEX_SETTINGS_LIST(w_cvar, w_prop, MINSTANEX, minstanex)
-#define MINSTANEX_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
- w_cvar(id, sn, PRI, ammo) \
- w_cvar(id, sn, PRI, animtime) \
- w_cvar(id, sn, PRI, refire) \
- w_cvar(id, sn, SEC, ammo) \
- w_cvar(id, sn, SEC, animtime) \
- w_cvar(id, sn, SEC, damage) \
- w_cvar(id, sn, SEC, delay) \
- w_cvar(id, sn, SEC, edgedamage) \
- w_cvar(id, sn, SEC, force) \
- w_cvar(id, sn, SEC, lifetime) \
- w_cvar(id, sn, SEC, radius) \
- w_cvar(id, sn, SEC, refire) \
- w_cvar(id, sn, SEC, shotangle) \
- w_cvar(id, sn, SEC, speed) \
- w_cvar(id, sn, SEC, spread) \
- w_prop(id, sn, float, reloading_ammo, reload_ammo) \
- w_prop(id, sn, float, reloading_time, reload_time) \
- w_prop(id, sn, float, switchdelay_raise, switchdelay_raise) \
- w_prop(id, sn, float, switchdelay_drop, switchdelay_drop) \
- w_prop(id, sn, string, weaponreplace, weaponreplace) \
- w_prop(id, sn, float, weaponstart, weaponstart) \
- w_prop(id, sn, float, weaponstartoverride, weaponstartoverride)
-
-#ifdef SVQC
-MINSTANEX_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
-.float minstanex_lasthit;
-.float jump_interval;
-#endif
-#else
-#ifdef SVQC
-void spawnfunc_weapon_minstanex (void) { weapon_defaultspawnfunc(WEP_MINSTANEX); }
-
-void W_MinstaNex_Attack (void)
-{
- float flying;
- flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
-
- W_SetupShot (self, TRUE, 0, "weapons/minstanexfire.wav", CH_WEAPON_A, 10000);
-
- yoda = 0;
- damage_goodhits = 0;
- FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 10000, 800, 0, 0, 0, 0, WEP_MINSTANEX);
-
- if(yoda && flying)
- Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
- if(damage_goodhits && self.minstanex_lasthit)
- {
- Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
- damage_goodhits = 0; // only every second time
- }
-
- self.minstanex_lasthit = damage_goodhits;
-
- pointparticles(particleeffectnum("nex_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
-
- // teamcolor / hit beam effect
- vector v;
- v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
- switch(self.team)
- {
- case NUM_TEAM_1: // Red
- if(damage_goodhits)
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED_HIT"), w_shotorg, v);
- else
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), w_shotorg, v);
- break;
- case NUM_TEAM_2: // Blue
- if(damage_goodhits)
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE_HIT"), w_shotorg, v);
- else
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), w_shotorg, v);
- break;
- case NUM_TEAM_3: // Yellow
- if(damage_goodhits)
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW_HIT"), w_shotorg, v);
- else
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), w_shotorg, v);
- break;
- case NUM_TEAM_4: // Pink
- if(damage_goodhits)
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK_HIT"), w_shotorg, v);
- else
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK"), w_shotorg, v);
- break;
- default:
- if(damage_goodhits)
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3_HIT"), w_shotorg, v);
- else
- WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v);
- break;
- }
-
- W_DecreaseAmmo(((g_minstagib) ? 1 : WEP_CVAR_PRI(minstanex, ammo)));
-}
-
-float w_minstanex(float req)
-{
- float ammo_amount;
- float minstanex_ammo;
-
- // now multiple WR_s use this
- minstanex_ammo = ((g_minstagib) ? 1 : WEP_CVAR_PRI(minstanex, ammo));
-
- switch(req)
- {
- case WR_AIM:
- {
- if(self.AMMO_VAL(WEP_MINSTANEX) > 0)
- self.BUTTON_ATCK = bot_aim(1000000, 0, 1, FALSE);
- else
- self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(minstanex, speed), 0, WEP_CVAR_SEC(minstanex, lifetime), FALSE); // WEAPONTODO: replace with proper minstanex cvars
-
- return TRUE;
- }
- case WR_THINK:
- {
- // if the laser uses load, we also consider its ammo for reloading
- if(WEP_CVAR(minstanex, reload_ammo) && WEP_CVAR_SEC(minstanex, ammo) && self.clip_load < min(minstanex_ammo, WEP_CVAR_SEC(minstanex, ammo))) // forced reload
- WEP_ACTION(self.weapon, WR_RELOAD);
- else if(WEP_CVAR(minstanex, reload_ammo) && self.clip_load < minstanex_ammo) // forced reload
- WEP_ACTION(self.weapon, WR_RELOAD);
- else if (self.BUTTON_ATCK)
- {
- if (weapon_prepareattack(0, WEP_CVAR_PRI(minstanex, refire)))
- {
- W_MinstaNex_Attack();
- weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(minstanex, animtime), w_ready);
- }
- }
- else if (self.BUTTON_ATCK2)
- {
- if (self.jump_interval <= time)
- if (weapon_prepareattack(1, -1))
- {
- // handle refire manually, so that primary and secondary can be fired without conflictions (important for minstagib)
- self.jump_interval = time + WEP_CVAR_SEC(minstanex, refire) * W_WeaponRateFactor();
-
- // decrease ammo for the laser?
- if(WEP_CVAR_SEC(minstanex, ammo))
- W_DecreaseAmmo(WEP_CVAR_SEC(minstanex, ammo));
-
- // ugly minstagib hack to reuse the fire mode of the laser
- float w;
- w = self.weapon;
- self.weapon = WEP_BLASTER;
- W_Blaster_Attack(
- WEP_CVAR_SEC(minstanex, shotangle),
- WEP_CVAR_SEC(minstanex, damage),
- WEP_CVAR_SEC(minstanex, edgedamage),
- WEP_CVAR_SEC(minstanex, radius),
- WEP_CVAR_SEC(minstanex, force),
- WEP_CVAR_SEC(minstanex, speed),
- WEP_CVAR_SEC(minstanex, spread),
- WEP_CVAR_SEC(minstanex, delay),
- WEP_CVAR_SEC(minstanex, lifetime)
- );
- self.weapon = w;
-
- // now do normal refire
- weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(minstanex, animtime), w_ready);
- }
- }
-
- return TRUE;
- }
- case WR_INIT:
- {
- precache_model("models/nexflash.md3");
- precache_model("models/weapons/g_minstanex.md3");
- precache_model("models/weapons/v_minstanex.md3");
- precache_model("models/weapons/h_minstanex.iqm");
- precache_sound("weapons/minstanexfire.wav");
- precache_sound("weapons/nexwhoosh1.wav");
- precache_sound("weapons/nexwhoosh2.wav");
- precache_sound("weapons/nexwhoosh3.wav");
- //W_Blaster(WR_INIT); // Samual: Is this really the proper thing to do? Didn't we already run this previously?
- MINSTANEX_SETTINGS(WEP_SKIPCVAR, WEP_SET_PROP)
- return TRUE;
- }
- case WR_SETUP:
- {
- self.current_ammo = AMMO_VAL(WEP_MINSTANEX);
- self.minstanex_lasthit = 0;
- return TRUE;
- }
- case WR_CHECKAMMO1:
- {
- ammo_amount = self.AMMO_VAL(WEP_MINSTANEX) >= minstanex_ammo;
- ammo_amount += self.(weapon_load[WEP_MINSTANEX]) >= minstanex_ammo;
- return ammo_amount;
- }
- case WR_CHECKAMMO2:
- {
- if(!WEP_CVAR_SEC(minstanex, ammo))
- return TRUE;
- ammo_amount = self.AMMO_VAL(WEP_MINSTANEX) >= WEP_CVAR_SEC(minstanex, ammo);
- ammo_amount += self.(weapon_load[WEP_MINSTANEX]) >= WEP_CVAR_SEC(minstanex, ammo);
- return ammo_amount;
- }
- case WR_CONFIG:
- {
- MINSTANEX_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
- return TRUE;
- }
- case WR_RESETPLAYER:
- {
- self.minstanex_lasthit = 0;
- return TRUE;
- }
- case WR_RELOAD:
- {
- float used_ammo;
- if(WEP_CVAR_SEC(minstanex, ammo))
- used_ammo = min(minstanex_ammo, WEP_CVAR_SEC(minstanex, ammo));
- else
- used_ammo = minstanex_ammo;
-
- W_Reload(used_ammo, "weapons/reload.wav");
- return TRUE;
- }
- case WR_SUICIDEMESSAGE:
- {
- return WEAPON_THINKING_WITH_PORTALS;
- }
- case WR_KILLMESSAGE:
- {
- return WEAPON_MINSTANEX_MURDER;
- }
- }
- return TRUE;
-}
-#endif
-#ifdef CSQC
-float w_minstanex(float req)
-{
- switch(req)
- {
- case WR_IMPACTEFFECT:
- {
- vector org2;
- org2 = w_org + w_backoff * 6;
- pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
- if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
-
- return TRUE;
- }
- case WR_INIT:
- {
- precache_sound("weapons/neximpact.wav");
- return TRUE;
- }
- }
- return TRUE;
-}
-#endif
-#endif
--- /dev/null
+#ifdef REGISTER_WEAPON
+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,
+/* model */ "minstanex",
+/* netname */ "minstanex",
+/* fullname */ _("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) \
+ w_cvar(id, sn, PRI, ammo) \
+ w_cvar(id, sn, PRI, animtime) \
+ w_cvar(id, sn, PRI, refire) \
+ w_cvar(id, sn, SEC, ammo) \
+ w_cvar(id, sn, SEC, animtime) \
+ w_cvar(id, sn, SEC, damage) \
+ w_cvar(id, sn, SEC, delay) \
+ w_cvar(id, sn, SEC, edgedamage) \
+ w_cvar(id, sn, SEC, force) \
+ w_cvar(id, sn, SEC, lifetime) \
+ w_cvar(id, sn, SEC, radius) \
+ w_cvar(id, sn, SEC, refire) \
+ w_cvar(id, sn, SEC, shotangle) \
+ w_cvar(id, sn, SEC, speed) \
+ w_cvar(id, sn, SEC, spread) \
+ w_prop(id, sn, float, reloading_ammo, reload_ammo) \
+ w_prop(id, sn, float, reloading_time, reload_time) \
+ w_prop(id, sn, float, switchdelay_raise, switchdelay_raise) \
+ w_prop(id, sn, float, switchdelay_drop, switchdelay_drop) \
+ w_prop(id, sn, string, weaponreplace, weaponreplace) \
+ w_prop(id, sn, float, weaponstart, weaponstart) \
+ w_prop(id, sn, float, weaponstartoverride, weaponstartoverride)
+
+#ifdef SVQC
+VAPORIZER_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
+.float vaporizer_lasthit;
+.float jump_interval;
+#endif
+#else
+#ifdef SVQC
+void spawnfunc_weapon_vaporizer (void) { weapon_defaultspawnfunc(WEP_VAPORIZER); }
+
+void W_Vaporizer_Attack (void)
+{
+ float flying;
+ flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
+
+ W_SetupShot (self, TRUE, 0, "weapons/minstanexfire.wav", CH_WEAPON_A, 10000);
+
+ yoda = 0;
+ damage_goodhits = 0;
+ FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 10000, 800, 0, 0, 0, 0, WEP_VAPORIZER);
+
+ if(yoda && flying)
+ Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
+ if(damage_goodhits && self.vaporizer_lasthit)
+ {
+ Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
+ damage_goodhits = 0; // only every second time
+ }
+
+ self.vaporizer_lasthit = damage_goodhits;
+
+ pointparticles(particleeffectnum("nex_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+
+ // teamcolor / hit beam effect
+ vector v;
+ v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
+ switch(self.team)
+ {
+ case NUM_TEAM_1: // Red
+ if(damage_goodhits)
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED_HIT"), w_shotorg, v);
+ else
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), w_shotorg, v);
+ break;
+ case NUM_TEAM_2: // Blue
+ if(damage_goodhits)
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE_HIT"), w_shotorg, v);
+ else
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), w_shotorg, v);
+ break;
+ case NUM_TEAM_3: // Yellow
+ if(damage_goodhits)
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW_HIT"), w_shotorg, v);
+ else
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), w_shotorg, v);
+ break;
+ case NUM_TEAM_4: // Pink
+ if(damage_goodhits)
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK_HIT"), w_shotorg, v);
+ else
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK"), w_shotorg, v);
+ break;
+ default:
+ if(damage_goodhits)
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3_HIT"), w_shotorg, v);
+ else
+ WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v);
+ break;
+ }
+
+ W_DecreaseAmmo(((g_minstagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo)));
+}
+
+float w_vaporizer(float req)
+{
+ float ammo_amount;
+ float vaporizer_ammo;
+
+ // now multiple WR_s use this
+ vaporizer_ammo = ((g_minstagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
+
+ switch(req)
+ {
+ case WR_AIM:
+ {
+ if(self.AMMO_VAL(WEP_VAPORIZER) > 0)
+ self.BUTTON_ATCK = bot_aim(1000000, 0, 1, FALSE);
+ else
+ self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), FALSE); // WEAPONTODO: replace with proper vaporizer cvars
+
+ return TRUE;
+ }
+ case WR_THINK:
+ {
+ // 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);
+ else if(WEP_CVAR(vaporizer, reload_ammo) && self.clip_load < vaporizer_ammo) // forced reload
+ WEP_ACTION(self.weapon, WR_RELOAD);
+ else if (self.BUTTON_ATCK)
+ {
+ if (weapon_prepareattack(0, WEP_CVAR_PRI(vaporizer, refire)))
+ {
+ W_Vaporizer_Attack();
+ weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(vaporizer, animtime), w_ready);
+ }
+ }
+ else if (self.BUTTON_ATCK2)
+ {
+ if (self.jump_interval <= time)
+ if (weapon_prepareattack(1, -1))
+ {
+ // handle refire manually, so that primary and secondary can be fired without conflictions (important for minstagib)
+ self.jump_interval = time + WEP_CVAR_SEC(vaporizer, refire) * W_WeaponRateFactor();
+
+ // decrease ammo for the laser?
+ if(WEP_CVAR_SEC(vaporizer, ammo))
+ W_DecreaseAmmo(WEP_CVAR_SEC(vaporizer, ammo));
+
+ // ugly minstagib hack to reuse the fire mode of the laser
+ float w;
+ w = self.weapon;
+ self.weapon = WEP_BLASTER;
+ W_Blaster_Attack(
+ WEP_CVAR_SEC(vaporizer, shotangle),
+ WEP_CVAR_SEC(vaporizer, damage),
+ WEP_CVAR_SEC(vaporizer, edgedamage),
+ WEP_CVAR_SEC(vaporizer, radius),
+ WEP_CVAR_SEC(vaporizer, force),
+ WEP_CVAR_SEC(vaporizer, speed),
+ WEP_CVAR_SEC(vaporizer, spread),
+ WEP_CVAR_SEC(vaporizer, delay),
+ WEP_CVAR_SEC(vaporizer, lifetime)
+ );
+ self.weapon = w;
+
+ // now do normal refire
+ weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);
+ }
+ }
+
+ return TRUE;
+ }
+ case WR_INIT:
+ {
+ precache_model("models/nexflash.md3");
+ precache_model("models/weapons/g_minstanex.md3");
+ precache_model("models/weapons/v_minstanex.md3");
+ precache_model("models/weapons/h_minstanex.iqm");
+ precache_sound("weapons/minstanexfire.wav");
+ precache_sound("weapons/nexwhoosh1.wav");
+ precache_sound("weapons/nexwhoosh2.wav");
+ precache_sound("weapons/nexwhoosh3.wav");
+ //W_Blaster(WR_INIT); // Samual: Is this really the proper thing to do? Didn't we already run this previously?
+ VAPORIZER_SETTINGS(WEP_SKIPCVAR, WEP_SET_PROP)
+ return TRUE;
+ }
+ case WR_SETUP:
+ {
+ self.current_ammo = AMMO_VAL(WEP_VAPORIZER);
+ self.vaporizer_lasthit = 0;
+ return TRUE;
+ }
+ case WR_CHECKAMMO1:
+ {
+ ammo_amount = self.AMMO_VAL(WEP_VAPORIZER) >= vaporizer_ammo;
+ ammo_amount += self.(weapon_load[WEP_VAPORIZER]) >= vaporizer_ammo;
+ return ammo_amount;
+ }
+ case WR_CHECKAMMO2:
+ {
+ if(!WEP_CVAR_SEC(vaporizer, ammo))
+ return TRUE;
+ ammo_amount = self.AMMO_VAL(WEP_VAPORIZER) >= WEP_CVAR_SEC(vaporizer, ammo);
+ ammo_amount += self.(weapon_load[WEP_VAPORIZER]) >= WEP_CVAR_SEC(vaporizer, ammo);
+ return ammo_amount;
+ }
+ case WR_CONFIG:
+ {
+ VAPORIZER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
+ return TRUE;
+ }
+ case WR_RESETPLAYER:
+ {
+ self.vaporizer_lasthit = 0;
+ return TRUE;
+ }
+ case WR_RELOAD:
+ {
+ float used_ammo;
+ if(WEP_CVAR_SEC(vaporizer, ammo))
+ used_ammo = min(vaporizer_ammo, WEP_CVAR_SEC(vaporizer, ammo));
+ else
+ used_ammo = vaporizer_ammo;
+
+ W_Reload(used_ammo, "weapons/reload.wav");
+ return TRUE;
+ }
+ case WR_SUICIDEMESSAGE:
+ {
+ return WEAPON_THINKING_WITH_PORTALS;
+ }
+ case WR_KILLMESSAGE:
+ {
+ return WEAPON_VAPORIZER_MURDER;
+ }
+ }
+ return TRUE;
+}
+#endif
+#ifdef CSQC
+float w_vaporizer(float req)
+{
+ switch(req)
+ {
+ case WR_IMPACTEFFECT:
+ {
+ vector org2;
+ org2 = w_org + w_backoff * 6;
+ pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
+ if(!w_issilent)
+ sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
+
+ return TRUE;
+ }
+ case WR_INIT:
+ {
+ precache_sound("weapons/neximpact.wav");
+ return TRUE;
+ }
+ }
+ return TRUE;
+}
+#endif
+#endif
}
if(IS_PLAYER(frag_attacker))
- if(DEATH_ISWEAPON(frag_deathtype, WEP_MINSTANEX))
+ if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
if(frag_target.armorvalue)
{
frag_target.armorvalue -= 1;
start_health = 100;
start_armorvalue = 0;
- start_weapons = WEPSET_MINSTANEX;
- warmup_start_weapons = WEPSET_MINSTANEX;
+ start_weapons = WEPSET_VAPORIZER;
+ warmup_start_weapons = WEPSET_VAPORIZER;
start_items |= IT_UNLIMITED_SUPERWEAPONS;
return FALSE;
if(self.classname == "item_cells")
return TRUE; // no normal cells?
- if(self.weapon == WEP_MINSTANEX && self.classname == "droppedweapon")
+ if(self.weapon == WEP_VAPORIZER && self.classname == "droppedweapon")
{
self.ammo_cells = autocvar_g_minstagib_ammo_drop;
return FALSE;
if(DEATH_ISWEAPON(deathtype, WEP_BLASTER))
return;
- if(DEATH_ISWEAPON(deathtype, WEP_NEX) || DEATH_ISWEAPON(deathtype, WEP_MINSTANEX))
+ if(DEATH_ISWEAPON(deathtype, WEP_NEX) || DEATH_ISWEAPON(deathtype, WEP_VAPORIZER))
{
force *= 6;
damage = self.max_health * 0.55;
/*
CORE laser nex lg rl cry gl elec hagar fireb hook
- minsta porto
+ vaporizer porto
tuba
NEW rifle hlac minel seeker
var float autocvar_g_vehicles_nex_damagerate = 0.5;
var float autocvar_g_vehicles_uzi_damagerate = 0.5;
var float autocvar_g_vehicles_rifle_damagerate = 0.75;
-var float autocvar_g_vehicles_minstanex_damagerate = 0.001;
+var float autocvar_g_vehicles_vaporizer_damagerate = 0.001;
var float autocvar_g_vehicles_tag_damagerate = 5;
float autocvar_g_vehicles;
if(DEATH_ISWEAPON(deathtype, WEP_RIFLE))
damage *= autocvar_g_vehicles_rifle_damagerate;
- if(DEATH_ISWEAPON(deathtype, WEP_MINSTANEX))
- damage *= autocvar_g_vehicles_minstanex_damagerate;
+ if(DEATH_ISWEAPON(deathtype, WEP_VAPORIZER))
+ damage *= autocvar_g_vehicles_vaporizer_damagerate;
if(DEATH_ISWEAPON(deathtype, WEP_SEEKER))
damage *= autocvar_g_vehicles_tag_damagerate;
//explosion = spawn();
// Find all non-hit players the beam passed close by
- if(deathtype == WEP_MINSTANEX || deathtype == WEP_NEX)
+ if(deathtype == WEP_VAPORIZER || deathtype == WEP_NEX)
{
FOR_EACH_REALCLIENT(msg_entity)
if(msg_entity != self)
- rocketlauncher: YES (except for trail bug)
- porto: YES (bwahahahaha)
- hlac: YES
-- minstanex: YES
+- vaporizer: YES
- rifle: YES
- fireball: YES (BFG effect cannot work through warpzones by design, so it's not available through warpzones)
- hook: YES
set g_vehicles_nex_damagerate 0.5
set g_vehicles_uzi_damagerate 0.65
set g_vehicles_rifle_damagerate 1
-set g_vehicles_minstanex_damagerate 0.007
+set g_vehicles_vaporizer_damagerate 0.007
set g_vehicles_tag_damagerate 2