From: Mario Date: Sat, 1 Aug 2020 01:23:55 +0000 (+1000) Subject: Draw EF_FLAME and EF_STARDUST effects as box particles rather than point particles... X-Git-Tag: xonotic-v0.8.5~813 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=340221e0b0251b0caf1036bc06912f2e40256f88;p=xonotic%2Fxonotic-data.pk3dir.git Draw EF_FLAME and EF_STARDUST effects as box particles rather than point particles, fixes func_stardust and effects on models larger than players --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index f08378b6a..388d1a982 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -525,9 +525,15 @@ void CSQCModel_Effects_Apply(entity this) if(eff & EF_FULLBRIGHT) this.renderflags |= RF_FULLBRIGHT; if(eff & EF_FLAME) - pointparticles(EFFECT_EF_FLAME, this.origin, '0 0 0', bound(0, frametime, 0.1)); + { + boxparticles(particleeffectnum(EFFECT_EF_FLAME), this, this.absmin, this.absmax, this.velocity, this.velocity, bound(0, frametime, 0.1), 0); + //pointparticles(EFFECT_EF_FLAME, this.origin, '0 0 0', bound(0, frametime, 0.1)); + } if(eff & EF_STARDUST) - pointparticles(EFFECT_EF_STARDUST, this.origin, '0 0 0', bound(0, frametime, 0.1)); + { + boxparticles(particleeffectnum(EFFECT_EF_STARDUST), this, this.absmin, this.absmax, this.velocity, this.velocity, bound(0, frametime, 0.1), 0); + //pointparticles(EFFECT_EF_STARDUST, this.origin, '0 0 0', bound(0, frametime, 0.1)); + } if(eff & EF_NOSHADOW) this.renderflags |= RF_NOSHADOW; if(eff & EF_NODEPTHTEST) diff --git a/qcsrc/common/mapobjects/func/stardust.qc b/qcsrc/common/mapobjects/func/stardust.qc index 9c2fba8ad..12d8e3781 100644 --- a/qcsrc/common/mapobjects/func/stardust.qc +++ b/qcsrc/common/mapobjects/func/stardust.qc @@ -1,9 +1,19 @@ #include "stardust.qh" #ifdef SVQC +void func_stardust_think(entity this) +{ + this.nextthink = time + 0.25; + CSQCMODEL_AUTOUPDATE(this); +} spawnfunc(func_stardust) { + if(this.model != "") { precache_model(this.model); _setmodel(this, this.model); } + this.effects = EF_STARDUST; CSQCMODEL_AUTOINIT(this); + + setthink(this, func_stardust_think); + this.nextthink = time + 0.25; } #endif