aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-02-02 16:39:16 +0100
committerorwell96 <mono96.mml@gmail.com>2017-02-02 16:39:16 +0100
commita8f9e3d43e1a256e73e1a40c261a7145d3652f5b (patch)
tree5ded51dfc53fae4082c984b08b8fdbc93520084b
parentf6d1157ba1b3bc8519b7c01f6b5974b0f9f5cae1 (diff)
downloadadvtrains-a8f9e3d43e1a256e73e1a40c261a7145d3652f5b.tar.gz
advtrains-a8f9e3d43e1a256e73e1a40c261a7145d3652f5b.tar.bz2
advtrains-a8f9e3d43e1a256e73e1a40c261a7145d3652f5b.zip
Fix collision to work with pos node hashes
-rw-r--r--advtrains/advtrains/trainlogic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/advtrains/trainlogic.lua b/advtrains/advtrains/trainlogic.lua
index 534b2b3..f28528f 100644
--- a/advtrains/advtrains/trainlogic.lua
+++ b/advtrains/advtrains/trainlogic.lua
@@ -404,7 +404,7 @@ function advtrains.train_step_b(id, train, dtime)
for x=-1,1 do
for z=-1,1 do
local testpos=vector.add(rcollpos, {x=x, y=0, z=z})
- local testpts=minetest.pos_to_string(testpos)
+ local testpts=minetest.hash_node_position(testpos)
if advtrains.detector.on_node[testpts] and advtrains.detector.on_node[testpts]~=id then
--collides
advtrains.spawn_couple_on_collide(id, testpos, advtrains.detector.on_node[testpts], train.movedir==-1)