]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/pointparticles.qc
Merge branch 'master' into TimePath/spawnfunc
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / pointparticles.qc
index 654db0f72ae1ba4cf979572e93718a7a5af7f692..04ab77f7fd70a4d3fd93f64b2cf26174416a7806 100644 (file)
@@ -6,7 +6,7 @@
 // NOTE: also contains func_sparks
 
 float pointparticles_SendEntity(entity to, float fl)
-{
+{SELFPARAM();
        WriteByte(MSG_ENTITY, ENT_CLIENT_POINTPARTICLES);
 
        // optional features to save space
@@ -89,13 +89,13 @@ float pointparticles_SendEntity(entity to, float fl)
 }
 
 void pointparticles_use()
-{
+{SELFPARAM();
        self.state = !self.state;
        self.SendFlags |= 2;
 }
 
 void pointparticles_think()
-{
+{SELFPARAM();
        if(self.origin != self.oldorigin)
        {
                self.SendFlags |= 4;
@@ -105,17 +105,17 @@ void pointparticles_think()
 }
 
 void pointparticles_reset()
-{
+{SELFPARAM();
        if(self.spawnflags & 1)
                self.state = 1;
        else
                self.state = 0;
 }
 
-void spawnfunc_func_pointparticles()
+spawnfunc(func_pointparticles)
 {
        if(self.model != "")
-               setmodel(self, self.model);
+               _setmodel(self, self.model);
        if(self.noise != "")
                precache_sound (self.noise);
 
@@ -157,7 +157,7 @@ void spawnfunc_func_pointparticles()
        self.nextthink = time;
 }
 
-void spawnfunc_func_sparks()
+spawnfunc(func_sparks)
 {
        // self.cnt is the amount of sparks that one burst will spawn
        if(self.cnt < 1) {
@@ -179,12 +179,12 @@ void spawnfunc_func_sparks()
        self.wait = 0;
        self.cnt = 0; // use mdl
 
-       spawnfunc_func_pointparticles();
+       spawnfunc_func_pointparticles(this);
 }
 #elif defined(CSQC)
 
 void Draw_PointParticles()
-{
+{SELFPARAM();
        float n, i, fail;
        vector p;
        vector sz;
@@ -230,7 +230,7 @@ void Draw_PointParticles()
                        if(self.noise != "")
                        {
                                setorigin(self, p);
-                               sound(self, CH_AMBIENT, self.noise, VOL_BASE * self.volume, self.atten);
+                               _sound(self, CH_AMBIENT, self.noise, VOL_BASE * self.volume, self.atten);
                        }
                        self.just_toggled = 0;
                }
@@ -244,7 +244,7 @@ void Draw_PointParticles()
 }
 
 void Ent_PointParticles_Remove()
-{
+{SELFPARAM();
        if(self.noise)
                strunzone(self.noise);
        self.noise = string_null;
@@ -254,7 +254,7 @@ void Ent_PointParticles_Remove()
 }
 
 void Ent_PointParticles()
-{
+{SELFPARAM();
        float i;
        vector v;
        int f = ReadByte();