Add Skid sound

master
Extex101 2020-09-08 10:43:11 -07:00 committed by GitHub
parent 02752d07f9
commit 376e7af022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -278,6 +278,11 @@ function biker.drive(entity, dtime)
entity.v = entity.v - biker.acceleration/10
elseif get_sign(entity.v) > 0 and entity.v > (biker.max_speed/10)-1 then
entity.v = entity.v - biker.braking/10
minetest.sound_play("motorbike_screech", {
max_hear_distance = 48,
gain = 0.5,
object = entity.object,
})
local num = 1
local pos = entity.object:getpos()
local d = 0.2