Jump to content

[B41.71] [Multiplayer] Fixing extreme lag when creating large non PVP zones


P_menta

Recommended Posts

ISAddNonPvpZoneUI.lua

Removing luautils.round() from line 73, 76, 78...81 removes the lag that increases exponentially when creating large non pvp zones

I don't know how to program, but even breaking the respective UI and emitting thousands of errors while it is open, I managed to create non-pvp zones of 4-cells sized.
 

So I don't see a reason for this function to be used, unless it's necessary to visualize the area.

I believe the IS should remake this system (and it just didn't because no one complained before), since creating a manual safehouse uses a different math and visualization that doesn't cause lag when trying to create huge zones.
 

    self:drawText(luautils.round(self.startingX,0) .. " x " .. luautils.round(self.startingY,0), splitPoint, z,1,1,1,1,UIFont.Small);
    z = z + FONT_HGT_SMALL + 15;
    self:drawText(getText("IGUI_PvpZone_CurrentPoint"), x, z,1,1,1,1,UIFont.Small);
    self:drawText(luautils.round(self.player:getX(),0) .. " x " .. luautils.round(self.player:getY(),0), splitPoint, z,1,1,1,1,UIFont.Small);
    z = z + FONT_HGT_SMALL + 15;
    local startingX = luautils.round(self.startingX,0);
    local startingY = luautils.round(self.startingY,0);
    local endX = luautils.round(self.player:getX(),0);
    local endY = luautils.round(self.player:getY(),0);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...