turrets_precache();
Announcer_Precache();
Tuba_Precache();
+ CSQCPlayer_Precache();
if(autocvar_cl_reticle)
{
if(self.entremove)
self.entremove();
+ if(self.skeletonindex)
+ {
+ skel_delete(self.skeletonindex);
+ self.skeletonindex = 0;
+ }
+
+ if(self.snd_looping > 0)
+ {
+ sound(self, self.snd_looping, "misc/null.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+ self.snd_looping = 0;
+ }
+
self.enttype = 0;
self.classname = "";
self.draw = menu_sub_null;
float autocvar_cl_precacheplayermodels;
float autocvar_cl_deathglow;
float autocvar_developer_csqcentities;
+float autocvar_g_jetpack_attenuation;
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
return;
sound(e, ch, samp, vol, attn);
- e.snd_looping = 1;
+ e.snd_looping = ch;
}
void Ent_RemoveProjectile()
{
- if(self.snd_looping)
- sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTN_NORM);
-
if(self.count & 0x80)
{
tracebox(self.origin, self.mins, self.maxs, self.origin + self.velocity * 0.05, MOVE_NORMAL, self);
float autocvar_g_jetpack_acceleration_side;
float autocvar_g_jetpack_acceleration_up;
float autocvar_g_jetpack_antigravity;
-float autocvar_g_jetpack_attenuation;
float autocvar_g_jetpack_fuel;
float autocvar_g_jetpack_maxspeed_side;
float autocvar_g_jetpack_maxspeed_up;
olditems = self.items;
if((self.items & IT_USING_JETPACK) && !self.deadflag)
- {
- SoundEntity_StartSound(self, CH_TRIGGER_SINGLE, "misc/jetpack_fly.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
self.modelflags |= MF_ROCKET;
- }
else
- {
- SoundEntity_StopSound(self, CH_TRIGGER_SINGLE);
self.modelflags &~= MF_ROCKET;
- }
self.effects &~= (EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
precache_sound ("player/lava.wav");
precache_sound ("player/slime.wav");
- if (g_jetpack)
- precache_sound ("misc/jetpack_fly.wav");
-
precache_model ("models/sprites/0.spr32");
precache_model ("models/sprites/1.spr32");
precache_model ("models/sprites/2.spr32");