if(self.csqcmodel_teleported)
Projectile_ResetTrail(self.origin);
}
+.float snd_looping;
void CSQCModel_Effects_Apply(void)
{
float eff = self.csqcmodel_effects;
if(self.csqcmodel_effects & CSQCMODEL_EF_RESPAWNGHOST)
self.renderflags |= RF_ADDITIVE;
// also special in CSQCPlayer_GlowMod_Apply
+
+ if(self.csqcmodel_modelflags & MF_ROCKET)
+ {
+ if(!self.snd_looping)
+ {
+ sound(self, CH_TRIGGER_SINGLE, "misc/jetpack_fly.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+ self.snd_looping = CH_TRIGGER_SINGLE;
+ }
+ }
+ else
+ {
+ if(self.snd_looping)
+ {
+ sound(self, self.snd_looping, "misc/null.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+ self.snd_looping = 0;
+ }
+ }
+}
+
+void CSQCPlayer_Precache()
+{
+ precache_sound("misc/jetpack_fly.wav");
}
// FEATURE: auto glowmod
else
{
// we know that frame3 and frame4 fields, used by InterpolateAnimation, are left alone - but that is all we know!
- float doblend = FALSE;
+ float doblend = autocvar__animblend;
float onground = 0;
if(self == csqcplayer)
{
sf |= CSQCMODEL_PROPERTY_FRAME2;
self.anim_saveframe = self.anim_frame;
self.anim_saveframe1time = self.anim_frame1time;
- self.anim_saveframe = self.anim_frame2;
+ self.anim_saveframe2 = self.anim_frame2;
self.anim_saveframe2time = self.anim_frame2time;
if(sf)
{
CSQCModel_InterpolateAnimation_2To4_Do();
if(doblend)
{
- // build a skeletonobject
+ skeleton_from_frames(self);
}
else
{
- // remove skeletonobject if any
- // all is done
+ free_skeleton_from_frames(self);
+ // just in case, clear these (we're animating in frame and frame3)
+ self.lerpfrac = 0;
+ self.lerpfrac4 = 0;
}
}
}