18bool autocvar_cl_vaporizerbeam_teamcolor =
true;
19bool autocvar_cl_vaporizerbeam_particle =
false;
20float autocvar_cl_vaporizerbeam_lifetime = 0.8;
21float autocvar_cl_vaporizerbeam_colorboost = 0.7;
23string Draw_VaporizerBeam_trace_callback_tex;
24float Draw_VaporizerBeam_trace_callback_rnd;
25vector Draw_VaporizerBeam_trace_callback_rgb;
26float Draw_VaporizerBeam_trace_callback_a;
33 for(i = 0; i < Draw_VaporizerBeam_trace_callback_a; ++i)
34 Draw_CylindricLine(hit, start, 8, Draw_VaporizerBeam_trace_callback_tex, 0.25, Draw_VaporizerBeam_trace_callback_rnd, Draw_VaporizerBeam_trace_callback_rgb,
min(1, Draw_VaporizerBeam_trace_callback_a - i),
DRAWFLAG_NORMAL, vorg);
35 Draw_VaporizerBeam_trace_callback_rnd += 0.25 *
vlen(hit - start) / 8;
39void VaporizerBeam_Draw(
entity this)
44 string tex =
"particles/lgbeam";
46 tex =
"particles/gauntletbeam";
47 vector rgb = WEP_VAPORIZER.m_color;
48 if(autocvar_cl_vaporizerbeam_teamcolor)
51 rgb *= (1 + autocvar_cl_vaporizerbeam_colorboost);
55 Draw_VaporizerBeam_trace_callback_tex = tex;
56 Draw_VaporizerBeam_trace_callback_rnd = 0;
57 Draw_VaporizerBeam_trace_callback_rgb = rgb;
58 Draw_VaporizerBeam_trace_callback_a =
bound(0, fail, 1);
60 Draw_VaporizerBeam_trace_callback_tex =
string_null;
69NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE,
bool isNew)
74 this.draw = VaporizerBeam_Draw;
87 if(autocvar_cl_vaporizerbeam_particle)
89 vector rgb = WEP_VAPORIZER.m_color;
90 if(autocvar_cl_vaporizerbeam_teamcolor)
111 dmgent.owner = dmgent.realowner = actor;
112 setorigin(dmgent, loc);
113 RadiusDamage (dmgent, actor,
autocvar_g_rm_damage,
autocvar_g_rm_edgedamage,
autocvar_g_rm_radius,
NULL,
NULL,
autocvar_g_rm_force, WEP_DEVASTATOR.m_id |
HITTYPE_SPLASH, weaponentity,
NULL);
129 FireRailgunBullet(actor, weaponentity,
w_shotorg,
w_shotorg +
w_shotdir *
max_shot_distance, vaporizer_damage,
true,
WEP_CVAR_PRI(WEP_VAPORIZER, force),
WEP_CVAR_PRI(WEP_VAPORIZER, damagefalloff_mindist),
WEP_CVAR_PRI(WEP_VAPORIZER, damagefalloff_maxdist),
WEP_CVAR_PRI(WEP_VAPORIZER, damagefalloff_halflife),
WEP_CVAR_PRI(WEP_VAPORIZER, damagefalloff_forcehalflife), thiswep.
m_id);
158 RadiusDamage(
this, this.
realowner, laser_damage, laser_damage,
autocvar_g_rm_laser_radius,
NULL,
NULL, laser_force, this.
projectiledeathtype, this.
weaponentity_fld, directhitentity);
197 int total = (mode == 0) ? laser_count : 1;
198 Sound snd = (mode == 0) ? SND_CRYLINK_FIRE : SND_ELECTRO_FIRE2;
204 for (
int counter = 0; counter < total; ++counter)
206 proj =
new(plasma_prim);
207 proj.owner = proj.realowner = actor;
208 proj.bot_dodge =
true;
214 proj.projectiledeathtype = WEP_ELECTRO.m_id;
215 proj.weaponentity_fld = weaponentity;
218 proj.rm_laser_count = total;
227 proj.velocity = (
w_shotdir + (((counter + 0.5) / total) * 2 - 1) *
v_right * spread) *
cvar(
"g_rm_laser_speed");
228 proj.velocity.z +=
cvar(
"g_rm_laser_zspread") * (
random() - 0.5);
235 setsize(proj,
'0 0 -3',
'0 0 -3');
259 if (
WEP_CVAR(WEP_VAPORIZER, reload_ammo)
263 thiswep.wr_reload(thiswep, actor, weaponentity);
267 if(
WEP_CVAR(WEP_VAPORIZER, reload_ammo)
268 && actor.(weaponentity).clip_load < vaporizer_ammo)
270 thiswep.wr_reload(thiswep, actor, weaponentity);
290 if(actor.(weaponentity).jump_interval <=
time && !actor.(weaponentity).hagar_load)
299 else if(rapid && actor.(weaponentity).jump_interval2 <=
time && actor.(weaponentity).hagar_load)
307 else if (actor.(weaponentity).jump_interval <=
time)
329 actor.vaporizer_lasthit = 0;
335 float ammo_amount =
GetResource(actor, thiswep.ammo_type) >= vaporizer_ammo;
336 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >= vaporizer_ammo;
351 actor.vaporizer_lasthit = 0;
361 used_ammo = vaporizer_ammo;
363 W_Reload(actor, weaponentity, used_ammo, SND_RELOAD);
368 return WEAPON_THINKING_WITH_PORTALS;
373 return WEAPON_VAPORIZER_MURDER;
419 PAR(_(
"The %s is a unique weapon, firing a deadly beam of energy dealing a huge amount of damage. "
420 "In %s, the beam has the ability to instantly kill enemies with a single shot, unless they have an %s."),
COLORED_NAME(
this),
COLORED_NAME(MUTATOR_mutator_instagib),
COLORED_NAME(ITEM_ExtraLife));
421 PAR(_(
"The secondary fire shoots a laser identical to that fired by the %s, with strong knockback."),
COLORED_NAME(WEP_BLASTER));
422 PAR(_(
"It is a superweapon, so isn't often found in game, except in %s where all players spawn with it."),
COLORED_NAME(MUTATOR_mutator_instagib));
423 PAR(_(
"It consumes some %s ammo with each shot."),
COLORED_NAME(ITEM_Cells));
void accuracy_add(entity this, Weapon w, float fired, float hit, float real)
update accuracy stats
bool accuracy_canbegooddamage(entity attacker)
if damage were to occur, would accuracy_isgooddamage be able to return true?
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
IntrusiveList g_bot_dodge
#define MUTATOR_CALLHOOK(id,...)
void W_Blaster_Attack(entity actor,.entity weaponentity)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
IntrusiveList g_drawables
#define colormapPaletteColor(c, isPants)
#define COLORED_NAME(this)
const int IT_UNLIMITED_AMMO
bool IsFlying(entity this)
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
float W_WeaponRateFactor(entity this)
void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg)
bool autocvar_cl_reticle_weapon
const float DRAWFLAG_NORMAL
vector particles_colormin
float trace_dphitq3surfaceflags
vector particles_colormax
float Q3SURFACEFLAG_NOIMPACT
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
void SUB_Remove(entity this)
Remove entity.
#define pointparticles(effect, org, vel, howmany)
#define particleeffectnum(e)
int entcs_GetClientColors(int i)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define NET_HANDLE(id, param)
#define Net_Accept(classname)
#define WriteHeader(to, id)
#define REGISTER_NET_TEMP(id)
void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end, float nomonsters, entity forent, entity zone, WarpZone_trace_callback_t cb)
void WarpZone_TrailParticles_WithMultiplier(entity own, float eff, vector org, vector end, float f, int boxflags)
vector WarpZone_UnTransformOrigin(entity wz, vector v)
vector WarpZone_TransformOrigin(entity wz, vector v)
entity WarpZone_trace_transform
void set_movetype(entity this, int mt)
const int MOVETYPE_BOUNCEMISSILE
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
entity Notification
always last
#define METHOD(cname, name, prototype)
const int PROJECTILE_ROCKETMINSTA_LASER
void adaptor_think2use_hittype_splash(entity this)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define PROJECTILE_MAKETRIGGER(e)
#define sound(e, c, s, v, a)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
float autocvar_g_rm_laser_spread_random
float autocvar_g_rm_laser_refire
float autocvar_g_rm_laser_spread
float autocvar_g_rm_laser_rapid_delay
float autocvar_g_rm_laser_rapid
float autocvar_g_rm_laser_lifetime
float autocvar_g_rm_laser_count
float autocvar_g_rm_radius
float autocvar_g_rm_laser_damage
float autocvar_g_rm_damage
float autocvar_g_rm_laser_speed
float autocvar_g_rm_laser_rapid_refire
float autocvar_g_rm_force
float autocvar_g_rm_laser_radius
float autocvar_g_rm_laser_force
float autocvar_g_rm_edgedamage
float autocvar_g_rm_laser
vector W_CalculateProjectileVelocity(entity actor, vector pvelocity, vector mvelocity, float forceAbsolute)
void FireRailgunBullet(entity this,.entity weaponentity, vector start, vector end, float bdamage, bool headshot_notify, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype)
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
void W_RocketMinsta_Attack(entity actor,.entity weaponentity, int mode)
void SendCSQCVaporizerBeamParticle(entity player, int hit)
void W_Vaporizer_Attack(Weapon thiswep, entity actor,.entity weaponentity)
void W_RocketMinsta_Laser_Explode_use(entity this, entity actor, entity trigger)
void W_RocketMinsta_Laser_Explode(entity this, entity directhitentity)
void W_RocketMinsta_Laser_Touch(entity this, entity toucher)
void W_RocketMinsta_Explosion(entity actor,.entity weaponentity, vector loc)
void W_RocketMinsta_Laser_Damage(entity this, entity directhitentity)
string W_Guide_Keybinds(Weapon wep)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
string W_Guide_DPS_onlyOne(string name, string fire)
#define WEP_CVAR_PRI(wep, name)
#define WEP_CVAR(wep, name)
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
bool weaponLocked(entity player)
float weapon_load[REGISTRY_MAX(Weapons)]