]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 f08378b6a86b27546eed52fe92434375c9615b5b..388d1a98298fb953b6c5a940e8057c608b7b2a96 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 9c2fba8ada8ed27ca928ba17218beadffcd70111..12d8e3781bc7cc38ef5f6f9658ef82eb093bf179 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