mirror of
https://github.com/APercy/automobiles_pck
synced 2025-08-23 21:26:23 +02:00
check for raycast
This commit is contained in:
parent
31bff73833
commit
8912e64db2
@ -286,6 +286,7 @@ minetest.register_entity("automobiles_buggy:buggy", {
|
||||
_show_rag = true,
|
||||
_show_lights = false,
|
||||
_light_old_pos = nil,
|
||||
_last_ground_check = 0,
|
||||
|
||||
get_staticdata = function(self) -- unloaded/unloads ... is now saved
|
||||
return minetest.serialize({
|
||||
@ -551,7 +552,11 @@ minetest.register_entity("automobiles_buggy:buggy", {
|
||||
self._steering_angle / 30 * turn_rate * automobiles_lib.sign(longit_speed)
|
||||
end
|
||||
|
||||
self._last_ground_check = self._last_ground_check + dtime
|
||||
if self._last_ground_check > 0.15 then
|
||||
self._last_ground_check = 0
|
||||
automobiles_lib.ground_get_distances(self, 0.372, 2.3)
|
||||
end
|
||||
|
||||
--[[if player and is_attached then
|
||||
player:set_look_horizontal(newyaw)
|
||||
|
@ -268,6 +268,7 @@ minetest.register_entity("automobiles_roadster:roadster", {
|
||||
_show_rag = true,
|
||||
_show_lights = false,
|
||||
_light_old_pos = nil,
|
||||
_last_ground_check = 0,
|
||||
|
||||
get_staticdata = function(self) -- unloaded/unloads ... is now saved
|
||||
return minetest.serialize({
|
||||
@ -524,7 +525,11 @@ minetest.register_entity("automobiles_roadster:roadster", {
|
||||
self._steering_angle / 30 * turn_rate * automobiles_lib.sign(longit_speed)
|
||||
end
|
||||
|
||||
self._last_ground_check = self._last_ground_check + dtime
|
||||
if self._last_ground_check > 0.15 then
|
||||
self._last_ground_check = 0
|
||||
automobiles_lib.ground_get_distances(self, 0.5, 2.422)
|
||||
end
|
||||
|
||||
--[[if player and is_attached then
|
||||
player:set_look_horizontal(newyaw)
|
||||
|
Loading…
Reference in New Issue
Block a user