Skip to content

Simple fix for a severe performance issue. #22

Description

@lhofhansl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions