mirror of
https://github.com/APercy/automobiles_pck
synced 2025-06-23 17:18:04 +02:00
block water submergence when in flight mode
This commit is contained in:
parent
fe19dcaebc
commit
3d4b653974
@ -602,6 +602,16 @@ minetest.register_entity("automobiles_delorean:delorean", {
|
|||||||
if noded.drawtype ~= 'liquid' then
|
if noded.drawtype ~= 'liquid' then
|
||||||
self._is_flying = 0
|
self._is_flying = 0
|
||||||
end
|
end
|
||||||
|
--avoid liquids
|
||||||
|
if noded.drawtype == 'liquid' then
|
||||||
|
self._car_gravity = 5
|
||||||
|
local fixed_vel = velocity
|
||||||
|
fixed_vel.y = 0.1
|
||||||
|
self.lastvelocity.y = fixed_vel.y --do not compute collision after
|
||||||
|
self.object:set_velocity(fixed_vel)
|
||||||
|
--curr_pos.y = curr_pos.y + 0.5
|
||||||
|
--self.object:move_to(curr_pos)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user