X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fweapons%2Fprojectile.qc;h=4e457dabab9bcf24f2dbe4338b29d9e8c0e5e6bc;hb=ac7deb97b1a0e73ceea4684be73e72912fb3f1aa;hp=067c0badb7da09a184c192daf1841d47c782da81;hpb=8e5d376c49510049572c7c182ba8778c8a8f80dd;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 067c0badb..4e457daba 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -1,20 +1,13 @@ #include "projectile.qh" -#include "../autocvars.qh" -#include "../defs.qh" -#include "../main.qh" #include - #include -#include #include +#include +#include #include #include - -#include - #include - #include .float alpha; @@ -48,7 +41,8 @@ void Projectile_DrawTrail(entity this, vector to) if (this.traileffect) { particles_alphamin = particles_alphamax = particles_fade = sqrt(this.alpha); - boxparticles(particleeffectnum(Effects_from(this.traileffect)), this, from, to, this.velocity, this.velocity, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE | PARTICLES_DRAWASTRAIL); + entity eff = REGISTRY_GET(Effects, this.traileffect); + boxparticles(particleeffectnum(eff), this, from, to, this.velocity, this.velocity, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE | PARTICLES_DRAWASTRAIL); } } @@ -308,7 +302,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) HANDLE(GRENADE_BOUNCING) this.traileffect = EFFECT_TR_GRENADE.m_id; break; HANDLE(MINE) this.traileffect = EFFECT_TR_GRENADE.m_id; break; HANDLE(BLASTER) this.traileffect = EFFECT_Null.m_id; break; - HANDLE(ARC_BOLT) this.traileffect = EFFECT_Null.m_id; break; + HANDLE(ARC_BOLT) this.traileffect = EFFECT_TR_WIZSPIKE.m_id; break; HANDLE(HLAC) this.traileffect = EFFECT_Null.m_id; break; HANDLE(PORTO_RED) this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.scale = 4; break; HANDLE(PORTO_BLUE) this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.scale = 4; break; @@ -439,6 +433,10 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) this.mins = '-4 -4 -4'; this.maxs = '4 4 4'; break; + case PROJECTILE_ARC_BOLT: + set_movetype(this, MOVETYPE_BOUNCE); + settouch(this, func_null); + break; case PROJECTILE_RAPTORBOMB: this.mins = '-3 -3 -3'; this.maxs = '3 3 3'; @@ -496,7 +494,6 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) if (!(this.count & 0x80)) InterpolateOrigin_Note(this); - this.classname = "csqcprojectile"; this.draw = Projectile_Draw; if (isnew) IL_PUSH(g_drawables, this); this.entremove = Ent_RemoveProjectile;