26 this.trail_oldorigin = to;
27 this.trail_oldtime =
time;
32 vector from = this.trail_oldorigin;
34 this.trail_oldorigin = to;
35 this.trail_oldtime =
time;
53 if (this.traileffect && a > 0)
61 const float fade_power = 0.5;
91 if (this.
count & 0x80)
112 if (this.
count & 0x80)
128 else switch (this.
cnt)
143 if (!rot.x && !rot.y)
164 trailorigin = this.
origin;
168 trailorigin +=
v_up * 4;
170 else switch (this.
cnt)
205 sound(e, ch, samp, vol, attn);
211 if (this.
count & 0x80)
235 this.
count = (f & 0x80);
261 if (!(this.
count & 0x80))
267 setorigin(
this, this.
origin);
268 if (this.
count & 0x80)
279 this.trail_oldorigin = this.
origin;
280 if (!(this.
count & 0x80))
312 this.
team = proj_team - 1;
338 this.
cnt = (this.
cnt & 0x7F);
341 this.traileffect = 0;
344#define HANDLE(id) case PROJECTILE_##id: setmodel(this, MDL_PROJECTILE_##id);
345 HANDLE(ELECTRO) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id;
break;
346 HANDLE(ROCKET) this.traileffect = EFFECT_TR_ROCKET.m_id; this.
scale = 2;
break;
347 HANDLE(CRYLINK) this.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id;
break;
348 HANDLE(CRYLINK_BOUNCING) this.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id;
break;
349 HANDLE(ELECTRO_BEAM) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id;
break;
350 HANDLE(GRENADE) this.traileffect = EFFECT_TR_GRENADE.m_id;
break;
351 HANDLE(GRENADE_BOUNCING) this.traileffect = EFFECT_TR_GRENADE.m_id;
break;
352 HANDLE(MINE) this.traileffect = EFFECT_TR_GRENADE.m_id;
break;
353 HANDLE(BLASTER) this.traileffect = EFFECT_Null.m_id;
break;
354 HANDLE(ARC_BOLT) this.traileffect = EFFECT_TR_WIZSPIKE.m_id;
break;
355 HANDLE(
HLAC) this.traileffect = EFFECT_Null.m_id;
break;
356 HANDLE(PORTO_RED) this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.
scale = 4;
break;
357 HANDLE(PORTO_BLUE) this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.
scale = 4;
break;
358 HANDLE(HOOKBOMB) this.traileffect = EFFECT_TR_KNIGHTSPIKE.m_id;
break;
359 HANDLE(HAGAR) this.traileffect = EFFECT_HAGAR_ROCKET.m_id; this.
scale = 0.75;
break;
360 HANDLE(HAGAR_BOUNCING) this.traileffect = EFFECT_HAGAR_ROCKET.m_id; this.
scale = 0.75;
break;
361 HANDLE(FIREBALL) this.
modelindex = 0; this.traileffect = EFFECT_FIREBALL.m_id;
break;
362 HANDLE(FIREMINE) this.
modelindex = 0; this.traileffect = EFFECT_FIREMINE.m_id;
break;
363 HANDLE(TAG) this.traileffect = EFFECT_TR_ROCKET.m_id;
break;
364 HANDLE(FLAC) this.
scale = 0.4; this.traileffect = EFFECT_FLAC_TRAIL.m_id;
break;
365 HANDLE(SEEKER) this.traileffect = EFFECT_SEEKER_TRAIL.m_id;
break;
367 HANDLE(MAGE_SPIKE) this.traileffect = EFFECT_TR_VORESPIKE.m_id;
break;
368 HANDLE(GOLEM_LIGHTNING) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id;
break;
370 HANDLE(RAPTORBOMB) this.
gravity = 1; this.
avelocity =
'0 0 180'; this.traileffect = EFFECT_Null.m_id;
break;
371 HANDLE(RAPTORBOMBLET) this.
gravity = 1; this.
avelocity =
'0 0 180'; this.traileffect = EFFECT_Null.m_id;
break;
372 HANDLE(RAPTORCANNON) this.traileffect = EFFECT_TR_CRYLINKPLASMA.m_id;
break;
374 HANDLE(SPIDERROCKET) this.traileffect = EFFECT_SPIDERBOT_ROCKET_TRAIL.m_id;
break;
375 HANDLE(WAKIROCKET) this.traileffect = EFFECT_RACER_ROCKET_TRAIL.m_id;
break;
376 HANDLE(WAKICANNON) this.traileffect = EFFECT_Null.m_id;
break;
378 HANDLE(BUMBLE_GUN) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id;
break;
379 HANDLE(BUMBLE_BEAM) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id;
break;
381 HANDLE(RPC) this.traileffect = EFFECT_TR_ROCKET.m_id;
break;
383 HANDLE(ROCKETMINSTA_LASER) this.traileffect = EFFECT_ROCKETMINSTA_LASER.m_id;
break;
389 error(
"Received invalid CSQC projectile, can't work with this!");
405 this.
mins =
'-4 -4 -4';
415 this.
mins =
'-3 -3 -3';
419 this.
mins =
'-3 -3 -3';
423 this.
mins =
'-3 -3 -3';
431 this.
mins =
'-8 -8 -8';
437 this.
mins =
'-4 -4 -4';
463 this.
mins =
'-16 -16 -16';
464 this.
maxs =
'16 16 16';
470 this.
mins =
'-4 -4 -4';
474 this.
mins =
'-2 -2 -2';
478 this.
mins =
'-2 -2 -2';
483 this.
mins =
'-4 -4 -4';
491 this.
mins =
'-3 -3 -3';
514 setsize(
this, this.
mins, this.
maxs);
534 if (!(this.
count & 0x80))
#define MUTATOR_CALLHOOK(id,...)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
bool Projectile_isnade(int p)
IntrusiveList g_drawables
#define colormapPaletteColor(c, isPants)
const float SOLID_TRIGGER
vector particles_colormin
vector particles_colormax
float PARTICLES_DRAWASTRAIL
#define particleeffectnum(e)
void InterpolateOrigin_Undo(entity this)
snap origin to iorigin2 (actual origin)
void InterpolateOrigin_Reset(entity this)
void InterpolateOrigin_Note(entity this)
void InterpolateOrigin_Do(entity this)
set origin based on iorigin1 (old pos), iorigin2 (desired pos), and time
const int IFLAG_AUTOANGLES
const int IFLAG_INTERNALMASK
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define NET_HANDLE(id, param)
void Movetype_Physics_MatchServer(entity this, bool sloppy)
void set_movetype(entity this, int mt)
void Movetype_Physics_NoMatchServer(entity this)
const int MOVETYPE_BOUNCEMISSILE
#define UNSET_ONGROUND(s)
const int MOVETYPE_BOUNCE
void Projectile_Draw(entity this)
void Projectile_DrawTrail(entity this, vector to)
void loopsound(entity e, int ch, Sound samp, float vol, float attn)
void Ent_RemoveProjectile(entity this)
void SUB_Stop(entity this, entity toucher)
void Projectile_ResetTrail(entity this, vector to)
bool autocvar_cl_projectiles_sloppy
const int PROJECTILE_HOOKBOMB
const int PROJECTILE_WAKIROCKET
const int PROJECTILE_GRENADE_BOUNCING
const int PROJECTILE_GOLEM_LIGHTNING
const int PROJECTILE_ELECTRO
const int PROJECTILE_FIREMINE
const int PROJECTILE_PORTO_BLUE
const int PROJECTILE_FIREBALL
const int PROJECTILE_RAPTORCANNON
const int PROJECTILE_CRYLINK_BOUNCING
const int PROJECTILE_FLAC
const int PROJECTILE_ROCKETMINSTA_LASER
const int PROJECTILE_HAGAR_BOUNCING
const int PROJECTILE_ROCKET
const int PROJECTILE_MINE
const int PROJECTILE_SPIDERROCKET
const int PROJECTILE_RAPTORBOMBLET
const int PROJECTILE_PORTO_RED
const int PROJECTILE_RAPTORBOMB
const int PROJECTILE_GRENADE
const int PROJECTILE_ARC_BOLT
const int PROJECTILE_SEEKER
#define REGISTRY_GET(id, i)
const int CH_SHOTS_SINGLE
#define sound(e, c, s, v, a)
#define PRECACHE(func)
directly after STATIC_INIT_LATE
#define WEP_CVAR(wep, name)
#define WEP_CVAR_SEC(wep, name)