Fixed minetest.env:add_entity ==> remove .env

This commit is contained in:
Brandon 2020-06-30 18:43:05 -04:00
parent 0ed66727be
commit b188fb4e95
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ local function register_lingering(name, descr, color, def)
local velocity = 10
local dir = placer:get_look_dir();
local pos = placer:getpos();
local obj = minetest.env:add_entity({x=pos.x+dir.x,y=pos.y+2+dir.y,z=pos.z+dir.z}, id.."_flying")
local obj = minetest.add_entity({x=pos.x+dir.x,y=pos.y+2+dir.y,z=pos.z+dir.z}, id.."_flying")
obj:setvelocity({x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity})
obj:setacceleration({x=0, y=-9.8, z=0})
if not minetest.settings:get_bool("creative_mode") then

View File

@ -17,7 +17,7 @@ local function register_splash(name, descr, color, def)
local velocity = 10
local dir = placer:get_look_dir();
local pos = placer:get_pos();
local obj = minetest.env:add_entity({x=pos.x+dir.x,y=pos.y+2+dir.y,z=pos.z+dir.z}, id.."_flying")
local obj = minetest.add_entity({x=pos.x+dir.x,y=pos.y+2+dir.y,z=pos.z+dir.z}, id.."_flying")
obj:set_velocity({x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity})
obj:set_acceleration({x=0, y=-9.8, z=0})
if not minetest.settings:get_bool("creative_mode") then