From a9e1c5ad19f5b27779710d4c1dc337332fd09bc9 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 31 Aug 2024 16:39:59 -0500 Subject: [PATCH] Silence debug prints and logging --- mods/ENTITIES/mcl_minecarts/carts/minecart.lua | 2 +- mods/ENTITIES/mcl_minecarts/functions.lua | 4 ++-- mods/ENTITIES/mcl_minecarts/movement.lua | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/ENTITIES/mcl_minecarts/carts/minecart.lua b/mods/ENTITIES/mcl_minecarts/carts/minecart.lua index 693767b1d..b736a4c03 100644 --- a/mods/ENTITIES/mcl_minecarts/carts/minecart.lua +++ b/mods/ENTITIES/mcl_minecarts/carts/minecart.lua @@ -37,7 +37,7 @@ function mod.attach_driver(cart, player) -- Update player information local uuid = staticdata.uuid mcl_player.player_attached[player_name] = true - minetest.log("action", player_name.." entered minecart #"..tostring(uuid).." at "..tostring(cart._start_pos)) + --minetest.log("action", player_name.." entered minecart #"..tostring(uuid).." at "..tostring(cart._start_pos)) -- Attach the player object to the minecart player:set_attach(cart.object, "", vector.new(1,-1.75,-2), vector.new(0,0,0)) diff --git a/mods/ENTITIES/mcl_minecarts/functions.lua b/mods/ENTITIES/mcl_minecarts/functions.lua index 187fa985f..caac7daf8 100644 --- a/mods/ENTITIES/mcl_minecarts/functions.lua +++ b/mods/ENTITIES/mcl_minecarts/functions.lua @@ -11,7 +11,7 @@ local function force_get_node(pos) local node = minetest.get_node(pos) if node.name ~= "ignore" then return node end - local time_start = minetest.get_us_time() + --local time_start = minetest.get_us_time() local vm = minetest.get_voxel_manip() local emin, emax = vm:read_from_map(pos, pos) local area = VoxelArea:new{ @@ -23,7 +23,7 @@ local function force_get_node(pos) local param2_data = vm:get_param2_data() local vi = area:indexp(pos) - minetest.log("force_get_node() voxel_manip section took "..((minetest.get_us_time()-time_start)*1e-6).." seconds") + --minetest.log("force_get_node() voxel_manip section took "..((minetest.get_us_time()-time_start)*1e-6).." seconds") return { name = minetest.get_name_from_content_id(data[vi]), param = param_data[vi], diff --git a/mods/ENTITIES/mcl_minecarts/movement.lua b/mods/ENTITIES/mcl_minecarts/movement.lua index 0ad9e2331..b60fbfe25 100644 --- a/mods/ENTITIES/mcl_minecarts/movement.lua +++ b/mods/ENTITIES/mcl_minecarts/movement.lua @@ -166,7 +166,7 @@ local function handle_cart_collision(cart1_staticdata, prev_pos, next_dir) -- Don't collide with the train car in front of you if cart1_staticdata.ahead == cart_uuid then return end - minetest.log("action","cart #"..cart1_staticdata.uuid.." collided with cart #"..cart_uuid.." at "..tostring(pos)) + --minetest.log("action","cart #"..cart1_staticdata.uuid.." collided with cart #"..cart_uuid.." at "..tostring(pos)) -- Standard Collision Handling local cart2_staticdata = get_cart_data(cart_uuid) @@ -549,7 +549,7 @@ local function do_detached_movement(self, dtime) -- Use vector projection to only keep the velocity in the new direction of movement on the rail -- https://en.wikipedia.org/wiki/Vector_projection staticdata.velocity = vector.dot(staticdata.dir,freebody_velocity) - print("Reattached velocity="..tostring(staticdata.velocity)..", freebody_velocity="..tostring(freebody_velocity)) + --print("Reattached velocity="..tostring(staticdata.velocity)..", freebody_velocity="..tostring(freebody_velocity)) -- Clear freebody movement self.object:set_velocity(vector.zero())