mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-07-07 15:20:28 -04:00
Fix for texture mod issue - if mob gets hit while still indicating damage, it gets stuck with the damage effect.
This commit is contained in:
parent
f11e6d458f
commit
1efd508792
2 changed files with 14 additions and 16 deletions
8
api.lua
8
api.lua
|
@ -68,7 +68,7 @@ local function get_node_height(pos)
|
|||
return pos.y + node.node_box.fixed[1][5]
|
||||
else
|
||||
return pos.y + 0.5
|
||||
end
|
||||
end
|
||||
elseif node.node_box
|
||||
and node.node_box.type == 'leveled' then
|
||||
return minetest.get_node_level(pos) / 64 - 0.5 + pos.y
|
||||
|
@ -297,9 +297,9 @@ end
|
|||
function creatura.is_valid(mob)
|
||||
if not mob then return false end
|
||||
if type(mob) == "table" then mob = mob.object end
|
||||
if type(mob) == "userdata" then
|
||||
if type(mob) == "userdata" then
|
||||
if mob:is_player() then
|
||||
if mob:get_look_horizontal() then return mob end
|
||||
if mob:get_look_horizontal() then return mob end
|
||||
else
|
||||
if mob:get_yaw() then return mob end
|
||||
end
|
||||
|
@ -432,4 +432,4 @@ end
|
|||
|
||||
local path = minetest.get_modpath("creatura")
|
||||
|
||||
dofile(path.."/mob_meta.lua")
|
||||
dofile(path.."/mob_meta.lua")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue