modules/world: fix movement functions for bump2D

The moveActor function is in bump2D a wrapper for the move function of
bump2D. But this function doesn't handle actual movement.

In order to make things samewise everywhere, let the actor handle actual
movement themselves.
This commit is contained in:
Kazhnuz 2019-04-22 09:42:33 +02:00
parent eac75df874
commit 42303da317
2 changed files with 2 additions and 3 deletions

View File

@ -84,7 +84,8 @@ function Actor2D:autoMove()
end
function Actor2D:move(newx, newy)
self.world:moveActor(self, newx, newy)
local cols, colNumber
self.x, self.y, cols, colNumber = self.world:moveActor(self, newx, newy)
end
-- DRAW FUNCTIONS

View File

@ -81,8 +81,6 @@ function BaseWorld:removeActor(actor)
end
function BaseWorld:moveActor(actor, x, y, filter)
actor.x = x
actor.y = y
-- as the baseworld have no collision function, we return empty collision
-- datas, but from the same type than bump2D will return
return x, y, {}, 0