Posts: 29
Threads: 3
Joined: Dec 2014
Thanks: 0
Given 0 thank(s) in 0 post(s)
03-18-2016, 02:16 AM
(This post was last modified: 03-18-2016, 02:18 AM by danny9484.)
yeah I think that might be possible I will try it tommorow
I could edit the trace function because I already saved the move direction in it on every fence I check it would be like
if the direction is not the same save the fence
Posts: 29
Threads: 3
Joined: Dec 2014
Thanks: 0
Given 0 thank(s) in 0 post(s)
03-18-2016, 02:29 AM
(This post was last modified: 03-18-2016, 02:34 AM by danny9484.)
ahh I remember why I didn't do that I wasn't sure how to load every fence again from the database
but I have a Idea now I could get one coordinate and try +X after that -X after that +Z after that -Z then 2 + X then 2 - X ... until I reach another point and I repeat this until I get back to the start the first coordinate. But still I would need to create ID's for gardens to do that but I think that's no Problem. or I just use the Gate as start
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
It's not only about saving the fences, it's also about deciding whether a point is inside the garden or not, and it's gonna get ugly soon.
Posts: 29
Threads: 3
Joined: Dec 2014
Thanks: 0
Given 0 thank(s) in 0 post(s)
the idea is not letting people in it it's not really necessary but I will think later about that and maybe add it as a update
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
Ah, I completely misunderstood the protection this plugin implements, sorry. I thought it was meant to protect the complete insides of the garden.
The DB should be fast enough for any reasonably sized garden, use prepared statements and transactions to improve the speed.
Posts: 29
Threads: 3
Joined: Dec 2014
Thanks: 0
Given 0 thank(s) in 0 post(s)
03-18-2016, 09:33 PM
(This post was last modified: 03-18-2016, 09:34 PM by danny9484.)
I think writing only the edges in the database should be enogh but how could I prepare a Database transaction?