Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple fix for a severe performance issue. #22

Open
lhofhansl opened this issue Jan 13, 2018 · 2 comments
Open

Simple fix for a severe performance issue. #22

lhofhansl opened this issue Jan 13, 2018 · 2 comments

Comments

@lhofhansl
Copy link

lhofhansl commented Jan 13, 2018

The first part fixes a very bad problem, where icelamanders and mese_dragons update the same blocks over and over again, marking them dirty even when they are not changed. That causes the pipeline of blocks from server to client to stall and no other blocks are transmitted anymore.

The second part is an API change in MineTest

diff --git a/nssm_api.lua b/nssm_api.lua                                        
index 1cf8819..2005196 100644                                                   
--- a/nssm_api.lua                                                              
+++ b/nssm_api.lua                                                              
@@ -507,7 +507,7 @@ function midas_ability(             --ability to transform every blocks it touches in the m                                                 
                                local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}  
                                local n = minetest.env:get_node(p).name         
                                                                                
-                               if minetest.get_item_group(n, "unbreakable") == 1 or minetest.is_protected(p, "") or n=="air" or (n == "bones:bones" and not nssm:affectbones(self)) then                                                       
+                               if minetest.get_item_group(n, "unbreakable") == 1 or minetest.is_protected(p, "") or n=="air" or (n == "bones:bones" and not nssm:affectbones(self)) or n==m_block then                                         
                                else                                            
                                        minetest.env:set_node(p, {name=m_block})
                                end                                             
@@ -847,7 +847,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)                                                                 
                local s = vector.add(pos, rad)                                  
                local r = vector.length(rad)                                    
                if r / radius < 1.4 then
-                       nodeupdate_single(s)
+                       core.check_single_for_falling(s)
                end
        end
        end
@lhofhansl
Copy link
Author

Is nssm still alive?

This small fix is the difference between Minetest stopping to load the world (since unnecessary block changes from nssm fill the block queue) and normal expected behavior.

@mckaygerhard
Copy link

thanks for the fix.. i opened this #27 but i only use 0.4 i will put my fork in codeberg and a mirror here in M$ crap of github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants