mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-07-18 20:36:41 -04:00
Spawning Improvements
This commit is contained in:
parent
5f48a07665
commit
0af4c2ba24
3 changed files with 40 additions and 24 deletions
10
mob_meta.lua
10
mob_meta.lua
|
@ -1156,7 +1156,7 @@ function mob:_vitals()
|
|||
local pos = self.stand_pos
|
||||
local node = self.stand_node
|
||||
if not pos or not node then return end
|
||||
local max_fall = self.max_fall or 0
|
||||
local max_fall = self.max_fall or 3
|
||||
local in_liquid = self.in_liquid
|
||||
local on_ground = self.touching_ground
|
||||
local damage
|
||||
|
@ -1168,12 +1168,14 @@ function mob:_vitals()
|
|||
damage = fall_start - pos.y
|
||||
if damage < max_fall then
|
||||
damage = nil
|
||||
else
|
||||
local resist = self.fall_resistance or 0
|
||||
damage = damage - damage * resist
|
||||
fall_start = nil
|
||||
end
|
||||
local resist = self.fall_resistance or 0
|
||||
damage = damage - damage * resist
|
||||
self._fall_start = nil
|
||||
end
|
||||
end
|
||||
self._fall_start = fall_start
|
||||
end
|
||||
if self:timer(1) then
|
||||
local stand_def = creatura.get_node_def(node.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue