]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cheats.qc
Send effects to client, allows mismatching effectinfo.txt
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cheats.qc
index eb5538319ab8c0ba9a2fa161bdab091c80aead79..cb19c007a7375dc29f879c2068f5fe222cc89323 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
+#include "../common/effects.qh"
 #include "../common/util.qh"
 
 #include "../common/monsters/all.qh"
@@ -281,7 +282,7 @@ float CheatImpulse(float i)
                        else
                                e = self;
 
-                       pointparticles(particleeffectnum("rocket_explode"), e.origin, '0 0 0', 1);
+                       Send_Effect("rocket_explode", e.origin, '0 0 0', 1);
                        sound(e, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
 
                        e2 = spawn();
@@ -320,13 +321,12 @@ float CheatCommand(float argc)
                                //   origin (0..1, on crosshair line)
                                //   velocity
                                //   howmany
-                               effectnum = particleeffectnum(argv(1));
                                f = stof(argv(2));
                                crosshair_trace(self);
                                start = (1-f) * self.origin + f * trace_endpos;
                                end = stov(argv(3));
                                f = stof(argv(4));
-                               pointparticles(effectnum, start, end, f);
+                               Send_Effect(argv(1), start, end, f);
                                DID_CHEAT();
                                break;
                        }