projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
be5e25d
)
fix water splash sound
author
hgn
<hgodden00@gmail.com>
Fri, 29 Mar 2024 15:16:36 +0000
(15:16 +0000)
committer
hgn
<hgodden00@gmail.com>
Fri, 29 Mar 2024 15:16:36 +0000
(15:16 +0000)
player_walk.c
patch
|
blob
|
history
player_walk.h
patch
|
blob
|
history
diff --git
a/player_walk.c
b/player_walk.c
index 843a50e979e45ade99aedd860659264e8b639277..62aff8ddfe2af0635e61b254422a26d64308036f 100644
(file)
--- a/
player_walk.c
+++ b/
player_walk.c
@@
-22,6
+22,7
@@
struct player_subsystem_interface player_subsystem_walk =
.post_animate = player__walk_post_animate,
.pose = player__walk_pose,
.network_animator_exchange = player__walk_animator_exchange,
.post_animate = player__walk_post_animate,
.pose = player__walk_pose,
.network_animator_exchange = player__walk_animator_exchange,
+ .sfx_oneshot = player__walk_sfx_oneshot,
.animator_data = &player_walk.animator,
.animator_size = sizeof(player_walk.animator),
.animator_data = &player_walk.animator,
.animator_size = sizeof(player_walk.animator),
@@
-1192,7
+1193,8
@@
void player__walk_animator_exchange( bitpack_ctx *ctx, void *data ){
bitpack_qf32( ctx, 16, -100.0f, 100.0f, &animator->board_yaw );
}
bitpack_qf32( ctx, 16, -100.0f, 100.0f, &animator->board_yaw );
}
-void player__walk_sfx_oneshot( u8 id, v3f pos, f32 volume ){
+void player__walk_sfx_oneshot( u8 id, v3f pos, f32 volume )
+{
audio_lock();
if( id == k_player_walk_soundeffect_splash ){
audio_lock();
if( id == k_player_walk_soundeffect_splash ){
diff --git
a/player_walk.h
b/player_walk.h
index b1213547c3d469c857a67a9a0417025bc3af1e53..da4172c1394ecc8f3d4bb93254dff1f3efa50fa5 100644
(file)
--- a/
player_walk.h
+++ b/
player_walk.h
@@
-87,7
+87,8
@@
static f32
k_sit_yaw_limit = VG_PIf/1.7f,
k_sit_pitch_limit = VG_PIf/4.0f;
k_sit_yaw_limit = VG_PIf/1.7f,
k_sit_pitch_limit = VG_PIf/4.0f;
-static void player__walk_register(void){
+static void player__walk_register(void)
+{
VG_VAR_F32( k_walkspeed, flags=VG_VAR_CHEAT );
VG_VAR_F32( k_runspeed, flags=VG_VAR_CHEAT );
VG_VAR_F32( k_stopspeed, flags=VG_VAR_CHEAT );
VG_VAR_F32( k_walkspeed, flags=VG_VAR_CHEAT );
VG_VAR_F32( k_runspeed, flags=VG_VAR_CHEAT );
VG_VAR_F32( k_stopspeed, flags=VG_VAR_CHEAT );
@@
-109,3
+110,4
@@
void player__walk_reset (void);
void player__walk_restore (void);
void player__walk_animator_exchange( bitpack_ctx *ctx, void *data );
void player__walk_transition( bool grounded, f32 board_yaw );
void player__walk_restore (void);
void player__walk_animator_exchange( bitpack_ctx *ctx, void *data );
void player__walk_transition( bool grounded, f32 board_yaw );
+void player__walk_sfx_oneshot( u8 id, v3f pos, f32 volume );