Draw EF_FLAME and EF_STARDUST effects as box particles rather than point particles...
authorMario <mario.mario@y7mail.com>
Sat, 1 Aug 2020 01:23:55 +0000 (11:23 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 1 Aug 2020 01:23:55 +0000 (11:23 +1000)
qcsrc/client/csqcmodel_hooks.qc
qcsrc/common/mapobjects/func/stardust.qc

index f08378b..388d1a9 100644 (file)
@@ -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)
index 9c2fba8..12d8e37 100644 (file)
@@ -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