Jump to content

[Fixed] Gates going to the center


Devious

Recommended Posts

After wiping our server yesterday in the hope of balancing gameplay a bit more after the gates going into the center seemed to be patched, we just found out that is still not the case.

We found a gate going into the center in an area closed off by voids, but there was another wormhole going into there from another position.

 

And yes the map/seed was generated after the patch in which it was claimed to be fixed.

If this takes longer to fix please provide a way to destroy gates since this is quite gamebreaking in the way that players can skip every quest and get right to the center without any effort.

Link to comment
Share on other sites

  • Boxelware Team

Do you have the seed and position of this? I have to reproduce it so I can see what the error is.

 

The last time this was reported (not sure if it was you) the reporter claimed it was because he edited some of the files or something, so I didn't give it more thought. Also: What should have been fixed were wormholes, not gates.

Link to comment
Share on other sites

I found this line of code in the gatesmap.lua in the lib folder that should stop the gates from generating into the center:

            -- check if it's not crossing the ring
            if passageMap:insideRing(a.x, a.y) ~= passageMap:insideRing(other.x, other.y) then goto continue end

 

Could it be that that line only applies to gates outside of the ring and not to gates being generated inside the ring?

 

Link to comment
Share on other sites

Unless I misunderstand something, it seems it only changed the conditions for how they can occur, but they can still pop up.

PassageMap:passable impassable ring condition : 147**2 < (x**2+y**2) < 150**2

r7448 PassageMap:insideRing : (x**2+y**2) < 147**2

r7633 PassageMap:insideRing : (x**2+y**2) < 151**2

 

in r7448 you can have a gate between let's say 147:0 and 160:0 because for both insideRing is false, yet both are passable so with the right seed can be regular w/ gates.

in r7633 you can have a gate between let's say 140:0 and 150:1 because for both insideRing is true, yet both are passable so with the right seed can be regular w/ gates.

 

so to me it looks like

local max = Balancing.BlockRingMax + 1

in insideRing should be

local max = Balancing.BlockRingMax

 

Exactly matching the less than check in passable.

That should guarantee there can't be a passable sector either side of the ring that's considered "on the wrong side" for gate connection purposes.

Link to comment
Share on other sites

Just to confirm what's been said.

 

I found a gate in Offline mode / Single Player, that also went to the centre.

 

I have frozen that particular game for further study, if needs be.

 

Beta 0.10.5, r7633

 

 

If you don't want gates in the restricted area - you may be better off using an invisible "background" colour for the whole area, and test for it, on a pointer and pixel basis. Then you could just not have gates generated where the COLOUR is present. That's if the ring is always in the same place of course.

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...