diff --git a/automobiles_buggy/buggy_utilities.lua b/automobiles_buggy/buggy_utilities.lua index 4066795..16c139b 100755 --- a/automobiles_buggy/buggy_utilities.lua +++ b/automobiles_buggy/buggy_utilities.lua @@ -57,10 +57,10 @@ end function buggy.engine_set_sound_and_animation(self, _longit_speed) --minetest.chat_send_all('test1 ' .. dump(self._engine_running) ) if self.sound_handle then - --if (math.abs(self._longit_speed) > math.abs(_longit_speed) + 0.08) or (math.abs(self._longit_speed) + 0.08 < math.abs(_longit_speed)) then + if (math.abs(self._longit_speed) > math.abs(_longit_speed) + 0.08) or (math.abs(self._longit_speed) + 0.08 < math.abs(_longit_speed)) then --minetest.chat_send_all('test2') buggy.engineSoundPlay(self) - --end + end end end diff --git a/automobiles_roadster/roadster_utilities.lua b/automobiles_roadster/roadster_utilities.lua index ff4ab29..a5991a7 100755 --- a/automobiles_roadster/roadster_utilities.lua +++ b/automobiles_roadster/roadster_utilities.lua @@ -55,10 +55,10 @@ end function roadster.engine_set_sound_and_animation(self, _longit_speed) --minetest.chat_send_all('test1 ' .. dump(self._engine_running) ) if self.sound_handle then - --if (math.abs(self._longit_speed) > math.abs(_longit_speed) + 0.08) or (math.abs(self._longit_speed) + 0.08 < math.abs(_longit_speed)) then + if (math.abs(self._longit_speed) > math.abs(_longit_speed) + 0.08) or (math.abs(self._longit_speed) + 0.08 < math.abs(_longit_speed)) then --minetest.chat_send_all('test2') roadster.engineSoundPlay(self) - --end + end end end