X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fweapons%2Fprojectile.qc;h=6e4903f4d9648598df27fea9104ef81e3a7d5754;hb=0514f7948727cfa572b33bd29d1bdf2c13cd866d;hp=067c0badb7da09a184c192daf1841d47c782da81;hpb=b9998b31fc75c66b601e66241350b10ca694809f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 067c0badb..6e4903f4d 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -1,20 +1,14 @@ #include "projectile.qh" -#include "../autocvars.qh" -#include "../defs.qh" -#include "../main.qh" +#include #include - #include -#include #include +#include +#include #include #include - -#include - #include - #include .float alpha; @@ -48,7 +42,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); } } @@ -496,7 +491,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;