Minetest logo

IRC log for #minetest-dev, 2016-07-12

| Channels | #minetest-dev index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:03 Ritchie joined #minetest-dev
02:14 rocky1138 joined #minetest-dev
02:27 ssieb joined #minetest-dev
02:42 Void7 joined #minetest-dev
02:59 rubenwardy joined #minetest-dev
03:21 Miner_48er joined #minetest-dev
03:24 DI3HARD139 joined #minetest-dev
04:50 SloanOnLinux joined #minetest-dev
05:09 Hunterz joined #minetest-dev
05:29 burli joined #minetest-dev
06:45 rdococ joined #minetest-dev
07:06 Darcidride joined #minetest-dev
07:16 davisonio joined #minetest-dev
07:20 Calinou joined #minetest-dev
07:35 Calinou joined #minetest-dev
07:44 Hunterz joined #minetest-dev
08:00 nrzkt joined #minetest-dev
08:00 davisonio joined #minetest-dev
08:04 Gael-de-Sailly joined #minetest-dev
08:11 Niebieski joined #minetest-dev
08:12 Niebieski Hey guys, I just tried to comment out the collision detection code and go climb anything. It worked.
08:13 Niebieski My account going to be banned again I guess. xD
08:19 Calinou joined #minetest-dev
08:21 Krock joined #minetest-dev
08:53 lisac joined #minetest-dev
09:21 Megaf joined #minetest-dev
09:21 edgrey joined #minetest-dev
09:21 Megaf Hello folks, so, anyone has any idea on how to fix my linking problem and if it's a bug here on in minetest itself?
09:28 Megaf #4306
09:28 ShadowBot https://github.com/minetest/minetest/issues/4306 -- Minetest failing to compile (link CXX executable) on Debian Stretch
09:52 Megaf I'm recompiling it here this time with ENABLE_SYSTEM_JSONCPP=0
09:55 xunto joined #minetest-dev
09:56 Megaf #4306
09:56 ShadowBot https://github.com/minetest/minetest/issues/4306 -- Minetest fails to link JSONCPP on Debian 9.x if -DENABLE_SYSTEM_JSONCPP=1
10:10 Krock joined #minetest-dev
10:58 proller joined #minetest-dev
11:05 Fixer joined #minetest-dev
11:40 SloanOnLinux joined #minetest-dev
11:43 SloanOnLinux joined #minetest-dev
11:56 Lunatrius` joined #minetest-dev
12:04 Lunatrius` joined #minetest-dev
12:05 Zeno` joined #minetest-dev
12:19 proller joined #minetest-dev
12:20 Grandolf joined #minetest-dev
12:45 rubenwardy joined #minetest-dev
12:51 paramat joined #minetest-dev
12:57 Darcidride_ joined #minetest-dev
13:06 Calinou joined #minetest-dev
13:16 VanessaE Bug report from one of my admins, "saplings are broken, they place on any node and ignore protection, [...]"   Is this still the case in current minetest_game?
13:16 VanessaE (these have to be mt_game as the server it was reported on doesn't run any mods that add trees)
13:51 paramat weird
13:52 rubenwardy Is it the sapling being placed or the tree growing?
13:53 VanessaE I assume the real problem is the tree growth
13:53 VanessaE because that person mentioned the trees were griefing protected structures.
13:53 paramat ah
13:53 VanessaE but preventing placing a sapling in a protected area is also surely needed.
13:53 paramat that should be fixed for months now
13:54 paramat (tree growth griefing)
13:54 paramat i fixed that on demand
13:54 VanessaE I'd have thought so; my minetest_game is from May 8, so not too old.
13:54 rubenwardy default.grow_sapling: https://github.com/minetest/minetest_game/blob/master/mods/default/trees.lua#L39     default.grow_tree: https://github.com/minetest/minetest_game/blob/master/mods/default/trees.lua#L162
13:54 paramat 2 types of tree schematics, the sapling version doesn't force=place
13:54 rubenwardy can't see any is_protected calls
13:56 paramat saplings are like any other node, they should not be able to be placed in protected areas
13:56 paramat think you need clarification from your reporter
13:56 rubenwardy what if they get placed just under the protection, then the tree grows into the protection?
13:56 paramat yeah that#s possible
13:56 paramat (')
13:57 paramat but a minor problem
13:57 nore paramat: why minor?
13:57 paramat and they won't replace any nodes
13:57 VanessaE I think that's what's happening, rubenwardy
13:58 VanessaE no node should ever be placed by sapling growth in a protected zone
13:58 paramat minor because they're not force-placed
13:58 rubenwardy the tree trunks would block the protected area, causing an annoyance for the owner
13:59 VanessaE paramat: it's not minor.  think tree growth into a house.   the structure is still there but now the houseis filled with leaves/trunks
13:59 VanessaE house is*
13:59 paramat ok
13:59 paramat just protect down to ground level then
14:00 paramat anyway, we could add protection checks to the edges of the tree volume, before adding schematic
14:01 paramat like say, at 5 points: +y, +-x, +-z
14:02 paramat still think you need clarification from your reporter
14:02 nore paramat: if we add checks, we still want people to be able to plant trees in their own house
14:02 nore so saplings need to get an owner
14:04 VanessaE paramat: the volume idea seems fair, so long as nore's concern is addressed of course
14:04 paramat oh man of course
14:05 paramat this is getting messy now
14:05 VanessaE tree growth always has been :P
14:06 paramat i don't think it's worth the complexity, if people protect properly down to ground level they'll be ok
14:06 VanessaE people will never protect "properly".
14:06 nore paramat: this is important
14:06 VanessaE and anyway you're still forgetting that a big tree will fill someone's house with one or two saplings.
14:06 nore paramat: also, depending on the protection mods, protection can be expensive
14:07 VanessaE you're basically asking people to add a large clearance around their buildings
14:07 VanessaE when they protect.
14:07 VanessaE which does NOT work in a real environment
14:07 paramat ok
14:08 paramat so sapling owner in metadata
14:08 VanessaE um, no...
14:09 VanessaE just check the area on place and as each node is spawned during growth - I mean just how much real "cost" would there be?
14:09 nore VanessaE: problem is, area can be protected or unprotected after
14:09 VanessaE (or volume check ahead of time, either way)
14:09 paramat because protection needs to know an owner
14:09 nore so I'd say owner in metadata is needed
14:09 VanessaE nore: sure, but the focus here needs to be what is/isn't protected when the tree grows
14:09 nore VanessaE: yes
14:09 VanessaE paramat: no, it doesn't.
14:10 nore and the owner is needed
14:10 paramat to allow protected area owner to grow sapligs
14:10 VanessaE well, it's needed I guess during growth but not when placing.
14:10 nore we want people to be able to grow trees in their own protected areas
14:10 VanessaE but the sapling shouldn't be "owned" in the same sense as a steel door
14:10 nore so owner needs to be saved in node metadata
14:10 nore VanessaE: no, only owned as in "that player placed the sapling"
14:11 VanessaE nore: ok.  then that I'm not too worried about
14:11 nore any player can tamper with it, but it will change the "owner"
14:12 VanessaE point is, a solution needs to be transparent enough that no one except a griefer will notice the change :)
14:12 paramat yeah 'last placer'
14:15 nore VanessaE: there will be a problem with placed ungrown saplings though
14:15 nore (in protected areas)
14:15 nore they will have to be placed again
14:15 VanessaE nore: why not an LBM that finds the closest area owner and assigns him/her to the sapling?
14:15 nore VanessaE: hmmm
14:15 nore is_protected is not designed to do that
14:15 VanessaE I know.
14:15 VanessaE that's the problem.
14:15 VanessaE well, why not just handle existing saplings as they are now, and limit the fix to newly-placed saplings.
14:15 sofar_ joined #minetest-dev
14:15 nore another I would have liked would have been an is_area_protected that says if any node in an area is protected
14:15 VanessaE OR
14:15 ElectronLibre_ joined #minetest-dev
14:15 VanessaE look up the ownership of the spot the sapling stands on, and use that for the ownership check for the growth
14:16 nore well, anyway, is_protected needs a redesign
14:16 nore VanessaE: not possible
14:16 VanessaE why not?
14:16 cat5e joined #minetest-dev
14:16 nore there's no function that gives the owner of a position...
14:16 VanessaE huh.
14:17 nore told you is_protected is not designed to do this
14:17 rubenwardy is_protected returns the owner of a node
14:17 rubenwardy or nil if not owned
14:17 rubenwardy or if the digger is allowed to dig there
14:17 nore rubenwardy: hmmm
14:17 rubenwardy /interact
14:17 nore I thought it was the third
14:18 nore is_protected(pos, player)
14:18 rubenwardy * or nil if the digger is allowed to dig there
14:18 nore oh, it returns the owner if not allowed
14:18 nore hmmmm
14:19 nore well, it's a bit better than I previously thought then
14:19 KaadmY joined #minetest-dev
14:20 VanessaE um, lua API says it only returns true, false, or nil.
14:22 VanessaE in any case you never answered my question - what would be the real cost of just calling that function (in some faster, internal way) for every node placed by the growth code?
14:22 VanessaE "I don't care what anything was 'designed' to do, I care what it CAN do!" :)
14:22 rubenwardy the message was added after the initial is_protected feature: https://github.com/minetest/minetest/commit/a890c66bc035918d7478fc1742241eadfd9a5bae
14:23 nore VanessaE: ehm
14:23 nore pretty expensive, if doing it for each node
14:23 VanessaE or as paramat said, just at five or six cardinal points
14:23 nore that would be better
14:23 paramat it can't be done for every node
14:24 VanessaE paramat: you mean it would be too expensive.  not "it can't be done".
14:24 paramat correct
14:24 rubenwardy oh, I seem to be mistaken :'(
14:24 whitephoenix joined #minetest-dev
14:24 rubenwardy in anycase, you can still give the placer's name to is_protected
14:25 VanessaE ok so if it's not designed for the task, then time to design something that WILL work.
14:26 paramat don't worry about pre-existing saplings without an owner, if they have no owner just disable growng into any protected area
14:27 VanessaE or,
14:27 VanessaE if they have no owner, give them to the server admin.
14:27 VanessaE (via an LBM)
14:27 VanessaE then they'll behave exactly as before
14:28 VanessaE I mean, you always have the owner/admin's name available, regardless of what is_protected() can or can't return
14:28 paramat no thanks, let's avoid LBMs if possible
14:28 VanessaE ok just *treat* it as owned-by-the-admin then when the growth ABM fires.
14:30 paramat not even that, any sapling with no 'placer' just doesn't grow into any protected volume. this is simple, saplings with no 'placer' are only briefly temporary
14:30 VanessaE that'll be a problem I think.
14:30 VanessaE they're not as temporary as you think.
14:31 paramat not a problem, a player can just re-plant it
14:31 VanessaE hah!
14:31 VanessaE you're funny :)
14:32 Zeno` I think we as devs need to listen to server operators objectively without letting our personal ideas of what's good/bad or right/wrong in the way
14:32 nore Zeno`: +1
14:33 VanessaE but no really.  people aren't just gonna wander around replanting saplings.  instead they'll complain that the saplings aren't growing.
14:34 paramat nah, that would be denying our experience and knowledge
14:34 paramat they will grow
14:34 VanessaE paramat: think tree farm.
14:34 VanessaE these are rather common for new builds.
14:34 Zeno` paramat, I don't run a server anymore. I am not a regular player anymore. These people are our source of FEEDBACK
14:35 Zeno` half the crap that worked when I ran a server and was a regular player is probably not valid anymore
14:35 Zeno` we have to listen more carefully IMO
14:35 paramat yeah that's fine, i'm listening and considering and value vanessas server experience
14:35 paramat but i won't stop myself pointing out a bad idea
14:36 Zeno` I don't see the points you said as to *why* it's a bad idea
14:36 VanessaE what's so bad about treating non-owned saplings as server-owner-owned for the purpose of the growth ABM?
14:36 paramat well ok that may be ok
14:37 VanessaE good. :)
14:37 Zeno` paramat, I'm not having a go at you personally. I fall into the same trap as well.
14:37 paramat is it simple to fetch admin name
14:37 paramat ?
14:37 VanessaE I think sop
14:37 VanessaE so*
14:37 T4im joined #minetest-dev
14:37 VanessaE somewhere there is an admin specified in the config.
14:38 VanessaE maybe it's just the name= field in mt.conf
14:38 VanessaE (I don't see it in any of the world files)
14:39 VanessaE which for any server out there will be that server's official admin anyway
14:39 VanessaE or you could read auth.txt and find any username in there with suitable privileges.
14:40 VanessaE (maybe "basic_privs" if something like "areas" isn't defined)
14:40 paramat surely admin ownership makes no difference: these pre-existing saplings will still not grow in most players own protected areas?
14:41 VanessaE tree farms.
14:41 VanessaE large plots of land that have been replanted.
14:41 VanessaE I'm sure there are other large-scale examples where the trees *must* be allowed to grow.
14:41 raingloom joined #minetest-dev
14:41 VanessaE both of these are quite common in a busy server.
14:41 T4im can't you just do the protection check on placement, and then simply not start the node timer?
14:41 paramat so you mean admins tend to have large protected areas of saplings?
14:42 VanessaE paramat: no, but regular users do.  the idea is to make sure the not-owned sapling sitting inside that large (as in 300-400 meters on a side) plot of land still grows.
14:42 Void7 joined #minetest-dev
14:43 paramat they still won't grow if they are in a regular player's protected area
14:43 VanessaE they will if the admin owns then at the moment of growth
14:44 VanessaE sorry if I'm not being clear
14:44 paramat are we talking about the behaviour of saplings planted before this proposed change comes into effect?
14:44 VanessaE I just don't want my users to notice any significant change, especially one that requires them to dig up and replant a thousand[*] saplings.
14:44 VanessaE [*] exaggeration, of course.
14:44 VanessaE yes.
14:44 paramat ok
14:45 paramat ok well as you understand this this would be fine
14:46 VanessaE sapling has no owner?  grow it with admin ownership so that protect areas are ignored.  otherwise use the owner it will have been given at planting time
14:46 VanessaE protection areas(
14:47 VanessaE should be a matter of one line in the ABM, plus whatever form the check-for-volume code takes.
14:47 Zeno` hang on
14:47 Zeno` what happens to saplings right now that are not "owned"?
14:47 VanessaE they should grow normally regardless of protection.
14:48 est31 joined #minetest-dev
14:48 Zeno` but what do they currently do?
14:48 VanessaE that.
14:48 VanessaE paramat's initial proposal was to not let them grow at all if they're in a protected area (otherwise grow normally if outside)
14:48 Zeno` well that's silly
14:49 Zeno` paramat, if that becomes a PR I'll oppose it
14:49 Zeno` it doesn't make much (if any) sense
14:49 VanessaE I think he's already changed his mind :)
14:49 Zeno` ok *phew*
14:49 rubenwardy How about let currently placed sapling grow like normal, but check for protection on sapling place
14:49 paramat oh yeah i see that's not good now
14:50 paramat i misunderstood
14:50 Zeno` rubenwardy, I don't think you can place a sapling in a protected area already (if you can, then /that's/ something that I'd agree should be fixed)
14:50 rdococ joined #minetest-dev
14:50 rubenwardy they can get placed just under the protection, then the tree grows into the protection
14:50 Zeno` rubenwardy, ahh ok
14:51 paramat yes best check on place then not start node timer
14:51 paramat bbl
14:51 paramat left #minetest-dev
14:51 Zeno` how can they grow into the protection if the sapling owner and the protected area owner are different?
14:52 Zeno` the code doesn't check?
14:52 VanessaE in the existing code, no.
14:52 VanessaE user Foo places a sapling right next to Bar's property, it will grow into Bar's property because Bar doesn't own the cube on which it was placed.
14:53 VanessaE so Foo can grief Bar's house with enough saplings
14:53 Zeno` and the side effects are that leaves (and possibly wood) replace air in the protected area?
14:53 VanessaE yep.
14:53 VanessaE leaves and trunks
14:53 VanessaE (depending on the type of tree)
14:53 Zeno` so... we check first
14:54 Zeno` it's a single 'if'
14:54 Zeno` that's not going to impact performance at all
14:55 Zeno` (and I really mean 0% difference in performance)
14:56 VanessaE well
14:56 VanessaE six checks (owner + volume)
14:56 Zeno` modern CPUs with branch prediction and pipelining... adding a conditional in something as small as that will make no performance difference as all (seriously)
14:56 VanessaE Å­t yeah, it won't have any effect.
14:57 Zeno` nah you let them plant them sapling but then just don't let protected air nodes be changed
14:57 VanessaE that would be too expensive.
14:57 Zeno` really?
14:57 VanessaE apparently so
14:57 VanessaE that's what the volume check would be for
14:57 VanessaE don't allow placement at all then
14:58 VanessaE that way the user has some warning that the sapling will never grow
14:58 T4im aren't trees schematics? that's already a place/no-place decision by api then
14:58 Zeno` maybe. There are several different approaches
14:58 VanessaE T4im: that's for overriding structural nodes. not air.
14:59 VanessaE but your point stands.
15:00 Zeno` ok, at any rate the issue needs to be looked at
15:00 T4im I mean the sapling grow function needs to make such a decision, because the api just allows full growth or no growth for it, no protection checks, no checks for replacement (except the full or air thing you mentioned)
15:02 VanessaE so just to summarize....  I guess the best is to check for ownership of the target location and if anything inside the tree's predicted volume is owned, and deny placement right there and then (with an error message).  for anything that was already placed, check at growth time if it's not owned, and if that's the case, just grow it anyway regardless of protection.
15:03 VanessaE otherwise take overlap of predicted volume and owned areas into account and deny growth.
15:03 VanessaE maybe even drop the sapling out as an item.
15:03 VanessaE you want SOME visual indication that a sapling will eventually grow where it stands.
15:04 T4im what do you mean with taking overlap into account?
15:04 VanessaE (right now the mere presence of the sapling is indication enough, but it won't be if conditions to prevent its growth are put into place)
15:04 VanessaE overlap of the tree's predicted volume with whatever areas are owned next to it
15:06 Void7 joined #minetest-dev
15:16 STHGOM joined #minetest-dev
15:16 Fixer VanessaE: is not areas mod excludes this kind of griefing?
15:16 VanessaE Fixer: nope.
15:16 VanessaE it can't stop a tree from growing.
15:16 Fixer VanessaE: is not it protects everything from top to buttom?
15:16 VanessaE no.
15:17 VanessaE it protects only within the area the user requested.
15:20 Fixer i've seen such kind of grief somewhere, but very rarely
15:22 VanessaE apparently one of my users' larger structures was damaged by it just recently.
15:22 VanessaE (the structure was some sort of giant tree)
15:23 T4im so cleaning up with a chainsaw is out of the question, too, great
15:23 nore VanessaE: I'd still say check on grow
15:23 nore if someone places a sapling
15:23 nore and then the area above is protected
15:24 VanessaE nore: I'm not against that
15:24 Fixer VanessaE: maybe "areas" and "protector redo" mod makers should add some workaround for this?
15:24 VanessaE Fixer: this is best fixed in the engine/game.
15:24 VanessaE nore: btw, something similar will surely be needed for the spawn_tree() call
15:25 nore VanessaE: no, spawn_tree is engine, isn't it?
15:25 nore if you want to check protection, you do before calling it
15:25 VanessaE yes but it also ignores protection
15:25 VanessaE I mean for the volume check
15:26 nore VanessaE: yes, it does
15:26 nore so if you want to place something
15:26 VanessaE seems to me that the engine should determine the volume when it tries to grow the tree, and pass that info back to Lua
15:26 nore but check for protection
15:26 nore then, you have to check before calling spawn_tree
15:26 VanessaE nono
15:26 nore and don't call it if it is protected
15:26 nore VanessaE: why ?
15:26 VanessaE that's for the ground node yeah
15:26 VanessaE but I mean for the volume check
15:27 VanessaE spawn_tree() should do whatever it does now, but return the min/max X/Y/Z coords if the tree failed protection checks.
15:27 VanessaE or something.
15:27 everamzah liquid source nodes placed outside of protection spill into protected areas, too, just as an aside
15:27 T4im you can probably get the volume from the mts file
15:27 VanessaE yes
15:27 nore VanessaE: no, you do the volume check before calling
15:28 VanessaE T4im: not for spawn_tree(), that's L-system
15:28 T4im oh
15:28 VanessaE nore: but how?
15:28 VanessaE nore: are you proposing a new engine APi call to do that?
15:28 nore VanessaE: check the corners
15:28 nore or, a new engine API could be good
15:29 VanessaE I mean, it's impossible really to know the volume of an L-system tree until it's been spawned, so something that iterates through the tree def to determine its volume would be needed.  but one would hope that same code could be used to cache a copy of the tree that can then be placed with some other call.
15:29 nore VanessaE: hm, there are L-system trees indeed
15:29 nore :/
15:30 VanessaE i.e. it "grows" the tree in an internal vmanip buffer or something, and only places that buffer on-demand
15:30 everamzah trying to play with a test and it's taking forever to grow them.  i have meselamps... they do take a while sometimes, eh
15:30 nore everamzah: I think if you wai 5-10 minutes they should all be grown
15:31 nore (with the nodetimer tree)
15:31 nore +s
15:31 everamzah k, thx
15:31 T4im nah, the new nodetimers have higher growtimes iirc
15:31 nore T4im: ah?
15:31 nore hm, don't remember what the time it
15:33 T4im 40-80minutes initially, and then maybe delay
15:35 everamzah good grief
15:35 T4im lbm started ones a bit earlier though
15:36 T4im (delay only if it cannot grow, it's then try every 2-10 minutes again)
15:41 everamzah kinda an obvious issue once you think about it.  someone places a sapling and a meselamp under your build.  then you get the privilege of removing a bunch of tree and leaves, but at least there's apples
15:41 everamzah sometimes
15:43 ABJ joined #minetest-dev
15:52 xunto joined #minetest-dev
15:56 paramat joined #minetest-dev
15:57 paramat it's no problem, for each sapling we know what volume the resulting tree will be, so check protection at a few points on the edges of that volume. for example jungletrees are 5x5x(up to 16)
15:58 edgrey joined #minetest-dev
15:58 VanessaE paramat: that's fine for schematic-based trees, yeah
15:58 paramat now what about rubenwardy's idea that doesn't need 'placer metadata': do all the checks 'on place sapling' and just don't start the timer if not allowed
15:59 VanessaE but not for L-system trees.  those aren't what my admin was reporting on, but they'll need addressed just the same.
15:59 paramat yeah
15:59 paramat well those aren't part of mtgame so deal with those seperately
16:00 est31 "so check protection at a few points on the edges of that volume"
16:00 est31 thats not really perfect
16:00 paramat it can't be perfect
16:00 est31 better is to add a volume based protection api check :)
16:00 paramat jungletree has 400 nodes
16:01 paramat ok perhaps
16:01 est31 minetest.is_protected_somewhere(player, minpos, maxpos)
16:01 est31 something like that
16:01 paramat if it's lightweight
16:02 est31 it depends on the implementation, but most protection mods should handle it just as well
16:02 Krock s/somewhere/area/
16:02 Hunterz joined #minetest-dev
16:02 est31 yeah, the actually chosen name is not as important
16:03 paramat checking points on the edges of the volume is just as effective
16:03 Krock but for big areas it may be insecure
16:03 est31 its less effective in fact
16:03 est31 and insecure
16:03 paramat protected areas are larger than 3x3
16:03 est31 the api nowhere says that
16:04 paramat yes, i mean such small areas are unlikely
16:04 est31 still they are possible
16:04 est31 and even if you checked multiple nodes at the edge, its less efficient
16:05 est31 e.g. think of tenplus1's protector mod
16:05 paramat anyway a protection-in-volume API would be best, if ths has to check every node
16:05 est31 how does that mod implement minetest.is_protected?
16:05 paramat (this)
16:05 Krock the protecor mods searchs for protector nodes bearby
16:05 rdococ_ joined #minetest-dev
16:05 Krock *nearby
16:05 est31 it does a minetest.find_nodes_in_area call
16:06 est31 around the checked position
16:06 est31 so if you call minetest.is_protected for some points at the edge of the area, it will spawn one such call for every point
16:07 est31 what the call does is nothing else than iterating over the whole area and checking for the node, in c++
16:07 est31 but, most times the areas will overlap, which means some nodes are checked multiple times
16:08 est31 a minetest.is_protected_area call can be implemented with a minetest.find_nodes_in_area call as well
16:08 est31 here however you only need a single call, which means that each node gets checked only one time
16:09 est31 AND its secure
16:09 paramat ok so yes i agree with checking every node, not just edges
16:10 est31 that can be used as fallback
16:10 est31 e.g. standard implementation of minetest.is_protected_area is doing minetest.is_protected on every node of the area
16:11 est31 but protection mods are encouraged to override it
16:11 est31 hrmm probably it should default to false if there is no protection mod at all
16:11 est31 so something like:
16:12 est31 function minetest.is_protected_area(player, minpos, maxpos)
16:12 est31 if is_protected_orig == minetest.is_protected then return false end
16:12 est31 for nodes in area inside minpos maxpos
16:12 T4im so do I understand correctly, the idea is to test both area-corner nodes of the requested area to be in any protected area directly? seems more efficient, yea
16:12 est31 if minetest.is_protected(bla) return true end
16:13 est31 end end
16:13 T4im two tests instead of multiple
16:13 est31 two tests are not enough
16:13 est31 it wont be secure
16:13 paramat all nodes of the volume
16:13 est31 thats the only really secure way to do it
16:14 T4im why not? 2 nodes span the entire requested area, if one of those two points is in *any* protected area, there is an overlap, done
16:14 est31 but protection mods should be allowed to give a more efficient solution
16:14 est31 T4im, not really, what if a protected area is completely inside the requested area, not touching those nodes?
16:14 T4im ah
16:14 T4im sneaky
16:15 est31 or if the area only overlaps with the requested area, but only crosses it from an edge you didnt check
16:15 paramat indeed
16:16 paramat anyway, all htis can be done inside a sapling's 'on construct', no 'sapling placer' metadata needed
16:16 paramat (this)
16:16 paramat just don't start the timer if it's not allowed to grow
16:17 est31 thats bad for the users
16:17 est31 they dont know why their trees dont grow
16:17 est31 prevent placing completely
16:17 paramat well yeah somesort of feedback
16:18 paramat yes prevent placing, just like protection
16:18 est31 also it might create the expectation that if the player asks the other player to remove the area, the sapling will start to grow
16:19 nore est31: if we add is_protected_area
16:20 nore it should be done differently than right now
16:20 nore i.e. like all other code that does registrations
16:20 nore because overriding the function causes a lot of problems
16:21 est31 yeah
16:21 T4im the problem is, that the iterations are expensive htough
16:21 nore T4im: iterating through the callbacks?
16:22 T4im the overriding and passing along is ideally even getting some tail-call optimization on the way
16:22 T4im nore yes
16:22 nore it's not more expensive than the function getting nested
16:22 nore and, remember it's a JIT compiler
16:22 nore so, it will probably completely inline that and there will be no difference at all
16:23 T4im unfolding you mean, yea, maybe, but it'll not compete with tail-call optimization
16:26 nore T4im: it will.
16:26 twoelk joined #minetest-dev
16:26 nore it a *loop*
16:26 nore instead of *nested* recusive calls
16:29 SloanOnLinux joined #minetest-dev
16:30 T4im there are no recursive nor nested calls, that's the idea, if every mod behaves (and yes, that could be where it breaks) then is_protected can be a single large function in bytecode
16:49 Warr1024_ joined #minetest-dev
16:50 hmmmm joined #minetest-dev
16:56 T4im one could argue, that there aren't enough protection mods for it to really, so the premature optimization argument might be risen on the tail-calling :D
16:57 T4im to matter*
17:01 Tesseract est31: FIX THE EFFING WEBLATE MERGE FAILURES ALREADY! ... please? :-)
17:02 est31 Tesseract, see the issue
17:03 est31 https://github.com/minetest/minetest/issues/4301
17:03 est31 I am waiting for feedback from c55 right now
17:03 est31 whether he has removed the weblate hook or not
17:03 Tesseract BTW devs, for those who don't know, when you force push weblate gets the first push and spams us via email until it's fixed.
17:04 est31 the solution is not to not force push :)
17:06 Tesseract est31: Of course, just so they know the consequences.
17:06 est31 I'll sit down later today and fix it for now again
17:06 est31 but i prefer a long term fix, where weblate doesnt update automatically
17:06 est31 but requires manual updates
17:07 est31 thats the proper way :)
17:08 Tesseract Great, 'cause I was just about to set up an auto-delete filter in my mail server.
17:22 Warr1024 joined #minetest-dev
17:24 nrzkt joined #minetest-dev
17:31 ptv joined #minetest-dev
17:34 Calinou joined #minetest-dev
17:40 Fixer Tesseract: what is the future of https://github.com/minetest/minetest/pull/3810 ?
17:47 Taoki[mobile] joined #minetest-dev
17:59 paramat needs more testing, i really should ..
18:04 est31 Tesseract, but note that it will probably break again in the future
18:04 est31 as long as the long term fix isnt applied
18:05 Calinou joined #minetest-dev
18:11 Niebieski joined #minetest-dev
18:12 davisonio joined #minetest-dev
18:50 Void7 joined #minetest-dev
18:58 raingloom joined #minetest-dev
18:59 DI3HARD139 joined #minetest-dev
19:13 paramat i'll merge #4308 #4309 in a moment
19:13 ShadowBot https://github.com/minetest/minetest/issues/4308 -- Treegen: Improve use of signed vs. unsigned integers by paramat
19:13 ShadowBot https://github.com/minetest/minetest/issues/4309 -- Correct description of node drop behavior per issue #4283 by duane-r
19:15 Fixer VanessaE: this also looks like grief by tree
19:15 TheReaperKing joined #minetest-dev
19:16 Fixer VanessaE: https://i.imgur.com/8H8kwZA.png
19:20 paramat merging
19:21 ssieb joined #minetest-dev
19:26 est31 T4im, about #4245
19:26 ShadowBot https://github.com/minetest/minetest/issues/4245 -- Builtin/profiler: Replace builtin profiler by t4im
19:27 est31 I'll squash the commits to one, is the commit msg of the first commit okay for being the one of the merged commit?
19:28 T4im I can update it to be; Zeno pointed out thought, that it would make bisecting harder if something came up
19:29 est31 well its all closely related changes
19:29 est31 and there is no commit of the form "replace all occurences of mine-test in the source code with minetest"
19:30 est31 or idk, "replace space indents with tabs"
19:34 paramat merged
19:39 Fixer after profiler merge I guess ABMs should be labeled in MTG
19:39 Fixer but what about lbms?
19:40 T4im it's possible, but not necessary; it'll use the name as fallback (but labels allow you to group them)
19:51 Darcidride joined #minetest-dev
19:51 T4im alright, thanks est31 :)
19:52 est31 thanks for doing the PR :)
19:52 T4im now I can get to the fun part and add features for a new PR :P
19:52 est31 :)
19:54 T4im but #3849 #4220 can be closed then for now, I guess
19:54 ShadowBot https://github.com/minetest/minetest/issues/3849 -- Replace mod profiler
19:54 ShadowBot https://github.com/minetest/minetest/issues/4220 -- mod_profiling - wrong function prototype for on_punch
19:59 paramat ok will do
20:02 paramat oh it's done
20:20 KaadmY joined #minetest-dev
20:32 Tmanyo joined #minetest-dev
20:34 VargaD joined #minetest-dev
20:47 est31 PTAL https://github.com/est31/minetest/commit/6621daee504bbc6755e0240a5515e16f56199197
20:47 est31 paramat, ^
20:50 est31 (if there is no reply, gonna push in 30 minutes)
20:50 rain_gloom joined #minetest-dev
21:12 VanessaE Fixer: indeed, that's an example of what I was talking about before (btw, don't run moretrees in "plant-like leaves" mode, it is no longer necessary)
21:16 proller joined #minetest-dev
21:48 paramat joined #minetest-dev
21:49 edgrey joined #minetest-dev
22:03 Miner_48er joined #minetest-dev
22:06 Player_2 joined #minetest-dev
22:27 troller joined #minetest-dev
22:34 VanessaE um, wut?  http://pastebin.ubuntu.com/19219569/
22:38 davisonio joined #minetest-dev
23:50 whitephoenix joined #minetest-dev
23:56 paramat left #minetest-dev

| Channels | #minetest-dev index | Today | | Google Search | Plaintext