mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-07-21 06:45:02 -04:00
Fix potential crash, Fix namespace issue, Fix crash when using fancy step
This commit is contained in:
parent
02322ca861
commit
fc19778172
2 changed files with 11 additions and 43 deletions
|
@ -873,6 +873,8 @@ end
|
|||
|
||||
-- Physics
|
||||
|
||||
local moveable = creatura.is_pos_moveable
|
||||
|
||||
local function do_step(self)
|
||||
if not fancy_step then return end
|
||||
local pos = self.object:get_pos()
|
||||
|
@ -916,8 +918,8 @@ local function collision_detection(self)
|
|||
for i = 2, #objects do
|
||||
local object = objects[i]
|
||||
if creatura.is_alive(object)
|
||||
and (not object:get_attach()
|
||||
or object:get_attach() ~= self.object) then
|
||||
and not self.object:get_attach()
|
||||
and not object:get_attach() then
|
||||
if i > 5 then break end
|
||||
local pos2 = object:get_pos()
|
||||
local dir = vec_dir(pos, pos2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue