fix driver error

This commit is contained in:
Alexsandro Percy 2023-06-18 19:56:59 -03:00
parent cae40858ea
commit e539ec4003
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ function steampunk_blimp.buoyancy_auto_correction(self, dtime)
if self._baloon_buoyancy > 0 then factor = -1 end
local time_correction = (dtime/steampunk_blimp.ideal_step)
local intensity = 0.2
local correction = (intensity*factor) * time_correction
local correction = (intensity*factor) * math.max(time_correction, steampunk_blimp.ideal_step)
--minetest.chat_send_player(self.driver_name, correction)
local before_correction = self._baloon_buoyancy
local new_baloon_buoyancy = self._baloon_buoyancy + correction

View File

@ -199,7 +199,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.take_control == "true" then
if ent.driver_name == nil or ent.driver_name == "" then
ent._at_control = true
for i = 5,1,-1
for i = steampunk_blimp.max_seats,1,-1
do
if ent._passengers[i] == name then
ent._passengers_base_pos[i] = vector.new(steampunk_blimp.pilot_base_pos)