);
// figure out the direction of force
- vel = normalize(combine_to_vector(head.velocity.x, head.velocity.y, 0));
+ vel = normalize(vec3(head.velocity.x, head.velocity.y, 0));
vel *=
(
bound(0, (vlen(vel) / autocvar_sv_maxspeed), 1)
const float SW_MAXALPHA = 0.5;
const float SW_FADETIME = 0.4;
const float SW_DISTTOMIN = 200;
-void Draw_Shockwave()
-{SELFPARAM();
+void Draw_Shockwave(entity this)
+{
// fading/removal control
float a = bound(0, (SW_MAXALPHA - ((time - self.sw_time) / SW_FADETIME)), SW_MAXALPHA);
if(a < ALPHA_MIN_VISIBLE) { remove(self); }