mirror of
https://github.com/HybridDog/builtin_item.git
synced 2024-12-23 01:10:26 +01:00
…
This commit is contained in:
parent
19c8b65f67
commit
2cea32d4d7
5
init.lua
5
init.lua
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user