mirror of
https://github.com/minetest-mods/throwing.git
synced 2024-11-16 15:40:22 +01:00
Fix some logging messages
This commit is contained in:
parent
c5d7e77828
commit
13aaea70fa
7
init.lua
7
init.lua
|
@ -62,21 +62,22 @@ local function arrow_step(self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not self.last_pos then
|
if not self.last_pos then
|
||||||
logging(" hitted a node during its first call to the step function", "warning")
|
logging("hitted a node during its first call to the step function")
|
||||||
put_arrow_back()
|
put_arrow_back()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if node and minetest.is_protected(pos, self.player) then -- Forbid hitting nodes in protected areas
|
if node and minetest.is_protected(pos, self.player) then -- Forbid hitting nodes in protected areas
|
||||||
|
logging("hitted a node into a protected area")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local ret, reason = self.on_hit(pos, self.last_pos, node, obj, player)
|
local ret, reason = self.on_hit(pos, self.last_pos, node, obj, player)
|
||||||
if ret == false then
|
if ret == false then
|
||||||
if reason then
|
if reason then
|
||||||
logging(": on_hit function failed for reason: "..reason, "warning")
|
logging(": on_hit function failed for reason: "..reason)
|
||||||
else
|
else
|
||||||
logging(": on_hit function failed", "warning")
|
logging(": on_hit function failed")
|
||||||
end
|
end
|
||||||
|
|
||||||
put_arrow_back()
|
put_arrow_back()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user