]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/unit/bumblebee.qc
Add support for traileffect on CSQC models
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / unit / bumblebee.qc
index d36392e207734c062c41887389909d89f2efaf33..d426a71808d48f62bc3ead87760575c1840b4348 100644 (file)
@@ -835,7 +835,7 @@ float v_bumblebee(float req)
                {
                        entity oldself = self;
 
-                       CSQCModel_UnlinkEntity();
+                       CSQCModel_UnlinkEntity(self);
 
                        // Hide beam
                        if(self.gun3.enemy || !wasfreed(self.gun3.enemy))
@@ -1029,7 +1029,7 @@ void bumble_raygun_draw()
 
        if(self.total_damages < time)
        {
-               boxparticles(self.traileffect, self, self.origin, self.origin + _dir * -64, _dir * -_len , _dir * -_len, 1, PARTICLES_USEALPHA);
+               boxparticles(particleeffectnum(effects_ent[self.traileffect]), self, self.origin, self.origin + _dir * -64, _dir * -_len , _dir * -_len, 1, PARTICLES_USEALPHA);
                boxparticles(self.lip, self, self.move_origin, self.move_origin + _dir * -64, _dir * -200 , _dir * -200, 1, PARTICLES_USEALPHA);
                self.total_damages = time + 0.1;
        }
@@ -1071,7 +1071,7 @@ void bumble_raygun_read(bool bIsNew)
                else
                        self.colormod = '0 1 0';
 
-               self.traileffect = particleeffectnum(EFFECT_BUMBLEBEE_HEAL_MUZZLEFLASH);
+               self.traileffect = EFFECT_BUMBLEBEE_HEAL_MUZZLEFLASH.m_id;
                self.lip = particleeffectnum(EFFECT_BUMBLEBEE_HEAL_IMPACT);
 
                self.draw = bumble_raygun_draw;