#903: MapMagic 2 / Bugs
Status: To-do

Hi Denis,

I have eventually been able to get Locks working for me with Objects.

(The first and unsurprising step of course was I had to “uncomment out” trees & objects lines in the LockDataSet class – that is probably commented out for people who get the “free” version – somehow it is still commented out in the paid version, and I see it is commented out in your repo, so I am just assuming that is by intention and I just missed the documentation on how to fully turn on my paid version)

But MEANWHILE – even after uncommenting that I was having generated objects appear right by my base (i.e. inside the lock). I could see my problematic objects coming through the “WriteInThread” of the ObjectLockData, but they were being ignored because they weren’t in what it thought was the radius. My LOCK was set in the Unity Editor to position 510,470, radius 25, transition 20. However I found during ObjectLockData it was comparing to a very different location e.g. centered at -16,-16 or some such.

Since GRASS and HEIGHT locks were working correctly, I went and looked inside of them and found that they were using the correct positioning whereas OBJECTS were not: image.png

So after some brief experiments I determined that in the Read method of ObjectsLockData, the addition of the mmPos vector to translate the center of the lock – seems to be a mistake! If I remove that mmPos (see below) the Object Locks started working immediately and no more objects being generated in the middle of my base! image.png

I was going to just send you a git pull request on Git Lab but discovered it wouldn’t let me fork your repo. But anyway it’s really just a one-line fix so no need for the extra overhead.

Created by akaWraith Jan 18, 2025