This commit is contained in:
Alexsandro Percy 2024-11-17 21:53:31 -03:00
parent 07d9ca1532
commit a92bf30b43

View File

@ -569,7 +569,8 @@ function automobiles_lib.engineSoundPlay(self)
if self._base_pitch then base_pitch = self._base_pitch end
local divisor = 6 --3 states, so 6 to make it more smooth
local snd_pitch = base_pitch + ((base_pitch/divisor)*self._transmission_state) + ((self._longit_speed/10)/2)
local multiplier = self._transmission_state or 1
local snd_pitch = base_pitch + ((base_pitch/divisor)*multiplier) + ((self._longit_speed/10)/2)
if self._transmission_state == 1 then
snd_pitch = base_pitch + (self._longit_speed/10)
end