2 #include "player_effects.h"
3 #include "player_render.h"
6 void effect_blink_apply( effect_blink
*ef
, player_pose
*pose
, f32 dt
)
9 ef
->t
= (1.0f
-powf(vg_randf64(&vg
.rand
),4.0f
))*4.0f
;
13 pose
->keyframes
[ localplayer
.id_eyes
-1 ].s
[1] = ef
->l
> 0.0f
? 0.2f
: 1.0f
;
19 void effect_spark_apply( effect_spark
*ef
, v3f co
, v3f v
, f32 dt
)
21 if( !ef
->colour
) return;
24 ef
->t
+= 0.05f
+vg_randf64(&vg
.rand
)*0.1f
;
29 f32 l
= v3_length(dir
);
30 v3_muls( dir
, 1.0f
/l
, dir
);
32 particle_spawn_cone( &particles_grind
, co
, dir
, VG_PIf
/2.0f
, l
,