.float silent;
.float traileffect;
+void Projectile_ResetTrail(vector to)
+{
+ self.trail_oldorigin = to;
+ self.trail_oldtime = time;
+}
void Projectile_DrawTrail(vector to)
{
vector from;
if (self.traileffect)
{
- if(checkextension("DP_CSQC_BOXPARTICLES"))
- {
- /* looks good, but we can do better with particle count
- particles_alphamin = particles_alphamax = self.alpha;
- boxparticles(self.traileffect, self, from, to, self.velocity, self.velocity, 1, PARTICLES_USEALPHA);
- */
- /* looks bad
- boxparticles(self.traileffect, self, from, to, self.velocity, self.velocity, self.alpha, 0);
- */
- particles_alphamin = particles_alphamax = sqrt(self.alpha);
- boxparticles(self.traileffect, self, from, to, self.velocity, self.velocity, sqrt(self.alpha), PARTICLES_USEALPHA);
- }
- else
- trailparticles(self, self.traileffect, from, to);
+ particles_alphamin = particles_alphamax = sqrt(self.alpha);
+ boxparticles(self.traileffect, self, from, to, self.velocity, self.velocity, sqrt(self.alpha), PARTICLES_USEALPHA);
}
}
else
Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
if(!(self.move_flags & FL_ONGROUND))
- self.angles = vectoangles(self.velocity);
+ if(self.velocity != '0 0 0')
+ self.angles = vectoangles(self.velocity);
}
else
{
if(drawn)
Projectile_DrawTrail(trailorigin);
else
- {
- self.trail_oldorigin = trailorigin;
- self.trail_oldtime = time;
- }
+ Projectile_ResetTrail(trailorigin);
if(!drawn)
return;
self.maxs = '3 3 3';
break;
case PROJECTILE_GRENADE:
- self.mins = '0 0 -3';
- self.maxs = '0 0 -3';
+ self.mins = '-3 -3 -3';
+ self.maxs = '3 3 3';
break;
case PROJECTILE_GRENADE_BOUNCING:
- self.mins = '0 0 -3';
- self.maxs = '0 0 -3';
+ self.mins = '-3 -3 -3';
+ self.maxs = '3 3 3';
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = SUB_Null;
self.move_bounce_factor = g_balance_grenadelauncher_secondary_bouncefactor;