diff options
author | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-11-11 00:26:01 +0100 |
---|---|---|
committer | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-11-11 00:26:01 +0100 |
commit | c62d9b9a3dfb32dae3377a2fe27c5d1febd7a05a (patch) | |
tree | d680f84eb80c34adbdb28639d7b0bfdb16b8dd96 /mario/portal.lua | |
parent | c9a814a173e70746b8756ca39bd1fdc694610e8a (diff) |
Fixed turtles going through portals, fly/noclip/fast priviledges will be temporarily disabled during the game, and increased a bit ghost radius
Diffstat (limited to 'mario/portal.lua')
-rw-r--r-- | mario/portal.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mario/portal.lua b/mario/portal.lua index 1ff31ee..6bee29b 100644 --- a/mario/portal.lua +++ b/mario/portal.lua @@ -9,8 +9,8 @@ minetest.register_node("mario:portal", { walkable = false, is_ground_content = false, groups = {cracky = 2,not_in_creative_inventory=1}, - on_player_collision = function(pos, player, gameid) - player:setpos({x=pos.x,y=pos.y+12,z=pos.z}) + on_turtle_collision = function(pos, obj, gameid) + obj:setpos({x=pos.x,y=pos.y+12,z=pos.z}) end }) minetest.register_node("mario:portal_left", { @@ -25,6 +25,9 @@ minetest.register_node("mario:portal_left", { groups = {cracky = 2,not_in_creative_inventory=0}, on_player_collision = function(pos, player, gameid) player:setpos(vector.add(pos,{x=31, y=0, z=0})) + end, + on_turtle_collision = function(pos, obj, gameid) + obj:setpos(vector.add(pos,{x=31, y=0, z=0})) end }) minetest.register_node("mario:portal_right", { @@ -39,5 +42,8 @@ minetest.register_node("mario:portal_right", { groups = {cracky = 2,not_in_creative_inventory=0}, on_player_collision = function(pos, player, gameid) player:setpos(vector.add(pos,{x=-31, y=0, z=0})) + end, + on_turtle_collision = function(pos, obj, gameid) + obj:setpos(vector.add(pos,{x=31, y=0, z=0})) end }) |