1
0
mirror of https://github.com/HybridDog/builtin_item.git synced 2024-12-23 01:10:26 +01:00
This commit is contained in:
Hybrid Dog 2017-06-11 08:59:50 +02:00
parent 19c8b65f67
commit 2cea32d4d7

View File

@ -177,7 +177,10 @@ item_entity.on_step = function(self, dtime)
if tmp.liquidtype == "flowing" then if tmp.liquidtype == "flowing" then
local vec = get_flowing_dir(pos) local vec = get_flowing_dir(pos)
if vec then if vec then
local v = vector.add(self.object:getvelocity(), vector.multiply(vector.subtract(vec, pos),.5)) local v = vector.add(
self.object:getvelocity(),
vector.multiply(vector.subtract(vec, pos),.5)
)
self.bt_vel = v self.bt_vel = v
self.object:setvelocity(v) self.object:setvelocity(v)
self.physical_state = true self.physical_state = true