mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 15:35:11 +00:00
Fixed minetest.env:add_entity ==> remove .env
This commit is contained in:
parent
0ed66727be
commit
b188fb4e95
2 changed files with 2 additions and 2 deletions
|
@ -75,7 +75,7 @@ local function register_lingering(name, descr, color, def)
|
||||||
local velocity = 10
|
local velocity = 10
|
||||||
local dir = placer:get_look_dir();
|
local dir = placer:get_look_dir();
|
||||||
local pos = placer:getpos();
|
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:setvelocity({x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity})
|
||||||
obj:setacceleration({x=0, y=-9.8, z=0})
|
obj:setacceleration({x=0, y=-9.8, z=0})
|
||||||
if not minetest.settings:get_bool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
|
|
|
@ -17,7 +17,7 @@ local function register_splash(name, descr, color, def)
|
||||||
local velocity = 10
|
local velocity = 10
|
||||||
local dir = placer:get_look_dir();
|
local dir = placer:get_look_dir();
|
||||||
local pos = placer:get_pos();
|
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_velocity({x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity})
|
||||||
obj:set_acceleration({x=0, y=-9.8, z=0})
|
obj:set_acceleration({x=0, y=-9.8, z=0})
|
||||||
if not minetest.settings:get_bool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
|
|
Loading…
Reference in a new issue