Skip to content

Commit

Permalink
fix luacheck warnings in driftgame
Browse files Browse the repository at this point in the history
  • Loading branch information
wsor4035 committed Nov 26, 2023
1 parent bf47788 commit 38a7ce5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mods/driftcar/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function car.on_detach_child(self, child)
end


local sound_cyc = 0
--local sound_cyc = 0

function car.on_step(self, dtime)
local vel = self.object:getvelocity()
Expand Down Expand Up @@ -251,7 +251,7 @@ function car.on_step(self, dtime)
taccmag = -grip * torm
end
end
end
end
end

-- Early return for near-stationary vehicle with driver
Expand Down Expand Up @@ -284,7 +284,7 @@ function car.on_step(self, dtime)
end
noturnctrl = false
end
end
end
end

-- If no turn control adjust turn towards zero
Expand Down Expand Up @@ -424,13 +424,13 @@ minetest.register_craftitem("driftcar:driftcar", {
end

pointed_thing.under.y = pointed_thing.under.y + 1.25
local car = minetest.add_entity(pointed_thing.under,
local car_entity = minetest.add_entity(pointed_thing.under,
"driftcar:driftcar")
if car then
if car_entity then
if placer then
car:setyaw(placer:get_look_horizontal())
car_entity:setyaw(placer:get_look_horizontal())
end
local player_name = placer and placer:get_player_name() or ""
--local player_name = placer and placer:get_player_name() or ""
itemstack:take_item()
end
return itemstack
Expand Down

0 comments on commit 38a7ce5

Please sign in to comment.