1 #include "player_effects.h"
2 #include "player_render.h"
5 void effect_blink_apply( effect_blink
*ef
, player_pose
*pose
, f32 dt
)
8 ef
->t
= (1.0f
-powf(vg_randf64(&vg
.rand
),4.0f
))*4.0f
;
12 pose
->keyframes
[ localplayer
.id_eyes
-1 ].s
[1] = ef
->l
> 0.0f
? 0.2f
: 1.0f
;
18 void effect_spark_apply( effect_spark
*ef
, v3f co
, v3f v
, f32 dt
)
20 if( !ef
->colour
) return;
23 ef
->t
+= 0.05f
+vg_randf64(&vg
.rand
)*0.1f
;
28 f32 l
= v3_length(dir
);
29 v3_muls( dir
, 1.0f
/l
, dir
);
31 particle_spawn_cone( &particles_grind
, co
, dir
, VG_PIf
/2.0f
, l
,