Skip to content

Commit

Permalink
Play the player_jump sound
Browse files Browse the repository at this point in the history
  • Loading branch information
Panquesito7 authored Jul 14, 2023
1 parent abf9199 commit 8e03818
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ function double_jump.jump(player)

-- 6.5 is the default height for a normal jump.
player:add_velocity(vector.new(0, max_jump_height, 0))

-- Play the `player_jump` sound.
-- This is originally played on each jump.
minetest.sound_play({ name = "player_jump" }, { pos = player:get_pos(), to_player = player:get_player_name() })
else
double_jump.has_jumped[player] = true
end
Expand Down

0 comments on commit 8e03818

Please sign in to comment.