6 void SendCSQCVaporizerBeamParticle(
entity player,
int hit) {
17 bool autocvar_cl_vaporizerbeam_particle =
false;
18 float autocvar_cl_vaporizerbeam_lifetime = 0.8;
19 float autocvar_cl_vaporizerbeam_colorboost = 0.7;
21 string Draw_VaporizerBeam_trace_callback_tex;
22 float Draw_VaporizerBeam_trace_callback_rnd;
23 vector Draw_VaporizerBeam_trace_callback_rgb;
24 float Draw_VaporizerBeam_trace_callback_a;
30 for(i = 0; i < Draw_VaporizerBeam_trace_callback_a; ++i)
31 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);
32 Draw_VaporizerBeam_trace_callback_rnd += 0.25 *
vlen(hit - start) / 8;
36 void VaporizerBeam_Draw(
entity this)
41 string tex =
"particles/lgbeam";
43 tex =
"particles/gauntletbeam";
53 rgb *= (1 + autocvar_cl_vaporizerbeam_colorboost);
57 Draw_VaporizerBeam_trace_callback_tex = tex;
58 Draw_VaporizerBeam_trace_callback_rnd = 0;
59 Draw_VaporizerBeam_trace_callback_rgb = rgb;
60 Draw_VaporizerBeam_trace_callback_a =
bound(0, fail, 1);
62 Draw_VaporizerBeam_trace_callback_tex =
string_null;
71 NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE,
bool isNew)
73 Net_Accept(vortex_beam);
76 this.draw = VaporizerBeam_Draw;
80 this.vorg1 = ReadVector();
81 this.vorg2 = ReadVector();
82 this.
cnt = ReadByte();
83 int myowner = ReadByte();
86 this.
team = ReadByte() - 1;
90 if(autocvar_cl_vaporizerbeam_particle)
109 dmgent.owner = dmgent.realowner = actor;
111 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);
127 FireRailgunBullet(actor, weaponentity,
w_shotorg,
w_shotorg +
w_shotdir * max_shot_distance, vaporizer_damage,
true,
WEP_CVAR_PRI(vaporizer, force), 0, 0, 0, 0, thiswep.
m_id);
135 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
138 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
146 W_RocketMinsta_Explosion(actor, weaponentity,
trace_endpos);
151 void W_RocketMinsta_Laser_Damage(
entity this,
entity directhitentity)
153 int laser_count =
max(1, this.rm_laser_count);
156 RadiusDamage(
this, this.
realowner, laser_damage, laser_damage,
autocvar_g_rm_laser_radius,
NULL,
NULL, laser_force, this.
projectiledeathtype, this.
weaponentity_fld, directhitentity);
159 void W_RocketMinsta_Laser_Explode(
entity this,
entity directhitentity)
166 Send_Notification(NOTIF_ONE, this.
realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH);
170 W_RocketMinsta_Laser_Damage(
this, directhitentity);
176 W_RocketMinsta_Laser_Explode(
this, trigger);
179 void W_RocketMinsta_Laser_Touch(
entity this,
entity toucher)
183 W_RocketMinsta_Laser_Damage(
this, toucher);
189 void W_RocketMinsta_Attack(
entity actor, .
entity weaponentity,
int mode)
195 int total = (mode == 0) ? laser_count : 1;
196 Sound snd = (mode == 0) ? SND_CRYLINK_FIRE : SND_ELECTRO_FIRE2;
202 for (
int counter = 0; counter < total; counter++)
204 proj =
new(plasma_prim);
205 proj.owner = proj.realowner = actor;
206 proj.bot_dodge =
true;
208 proj.use = W_RocketMinsta_Laser_Explode_use;
212 proj.projectiledeathtype = WEP_ELECTRO.m_id;
213 proj.weaponentity_fld = weaponentity;
216 proj.rm_laser_count = total;
225 proj.velocity = (
w_shotdir + (((counter + 0.5) / total) * 2 - 1) *
v_right * spread) *
cvar(
"g_rm_laser_speed");
226 proj.velocity.z +=
cvar(
"g_rm_laser_zspread") * (
random() - 0.5);
232 settouch(proj, W_RocketMinsta_Laser_Touch);
233 setsize(proj,
'0 0 -3',
'0 0 -3');
234 proj.flags = FL_PROJECTILE;
247 if((actor.items & IT_UNLIMITED_AMMO) ||
GetResource(actor, thiswep.ammo_type) > 0)
257 thiswep.wr_reload(thiswep, actor, weaponentity);
258 }
else if(
WEP_CVAR(vaporizer, reload_ammo) && actor.(weaponentity).clip_load < vaporizer_ammo) {
259 thiswep.wr_reload(thiswep, actor, weaponentity);
265 W_Vaporizer_Attack(thiswep, actor, weaponentity);
274 if(actor.(weaponentity).jump_interval <=
time && !actor.(weaponentity).held_down)
277 actor.(weaponentity).held_down =
true;
281 W_RocketMinsta_Attack(actor, weaponentity, 0);
283 else if(rapid && actor.(weaponentity).jump_interval2 <=
time && actor.(weaponentity).held_down)
287 W_RocketMinsta_Attack(actor, weaponentity, 1);
291 else if (actor.(weaponentity).jump_interval <=
time)
300 BLASTER_SECONDARY_ATTACK(vaporizer, actor, weaponentity);
307 actor.(weaponentity).held_down =
false;
311 actor.vaporizer_lasthit = 0;
316 float ammo_amount =
GetResource(actor, thiswep.ammo_type) >= vaporizer_ammo;
317 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >= vaporizer_ammo;
330 actor.vaporizer_lasthit = 0;
339 used_ammo = vaporizer_ammo;
341 W_Reload(actor, weaponentity, used_ammo, SND_RELOAD);
345 return WEAPON_THINKING_WITH_PORTALS;
349 return WEAPON_VAPORIZER_MURDER;
357 vector org2 = w_org + w_backoff * 6;
const int HITTYPE_SPLASH
automatically set by RadiusDamage
#define WEP_CVAR_PRI(wepname, name)
#define PHYS_INPUT_BUTTON_ATCK2(s)
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity)
#define WEP_CVAR_SEC(wepname, name)
float weapon_load[REGISTRY_MAX(Weapons)]
entity EFFECT_VAPORIZER_HIT(int teamid)
float autocvar_g_rm_laser_rapid
#define PROJECTILE_MAKETRIGGER(e)
float autocvar_g_rm_laser_rapid_delay
float trace_dphitq3surfaceflags
float autocvar_g_rm_laser_spread
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
vector WarpZone_TransformOrigin(entity wz, vector v)
float MOVETYPE_BOUNCEMISSILE
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
#define NET_HANDLE(id, param)
#define WEP_CVAR(wepname, name)
float autocvar_g_rm_force
#define METHOD(cname, name, prototype)
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
float autocvar_g_rm_laser_count
IntrusiveList g_bot_dodge
vector WarpZone_UnTransformOrigin(entity wz, vector v)
#define PROJECTILE_TOUCH(e, t)
bool weaponLocked(entity player)
float autocvar_g_rm_radius
float autocvar_g_rm_laser_radius
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
const float DRAWFLAG_NORMAL
#define PHYS_INPUT_BUTTON_ATCK(s)
float autocvar_g_rm_laser_force
float autocvar_g_rm_laser_damage
const int HITTYPE_SECONDARY
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
float Q3SURFACEFLAG_NOIMPACT
bool autocvar_cl_reticle_weapon
bool IsFlying(entity this)
const int PROJECTILE_ROCKETMINSTA_LASER
vector(float skel, float bonenum) _skel_get_boneabs_hidden
entity WarpZone_trace_transform
float autocvar_g_rm_edgedamage
IntrusiveList g_projectiles
float autocvar_g_rm_laser_speed
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void accuracy_add(entity this, Weapon w, float fired, float hit)
entity Notification
always last
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
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 WarpZone_TrailParticles(entity own, float eff, vector org, vector end)
#define MUTATOR_CALLHOOK(id,...)
float autocvar_g_rm_laser_spread_random
#define REGISTER_NET_TEMP(id)
void adaptor_think2use_hittype_splash(entity this)
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
vector W_CalculateProjectileVelocity(entity actor, vector pvelocity, vector mvelocity, float forceAbsolute)
#define sound(e, c, s, v, a)
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)
float autocvar_g_rm_laser_lifetime
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
bool accuracy_canbegooddamage(entity attacker)
float W_WeaponRateFactor(entity this)
void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end, float nomonsters, entity forent, entity zone, WarpZone_trace_callback_t cb)
entity EFFECT_VAPORIZER(int teamid)
float autocvar_g_rm_laser_refire
IntrusiveList g_drawables
void set_movetype(entity this, int mt)
#define colormapPaletteColor(c, isPants)
float autocvar_g_rm_laser_rapid_refire
float autocvar_g_rm_laser
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)
float autocvar_g_rm_damage
#define particleeffectnum(e)