Time Nick Message 01:33 Blockhead256 someone needs to put out (or point out, if it already exists) a good tutorial on rollback. I've poked a lot of Luanti's corners, but not that one 02:07 MTDiscord 1, run the command 2. be prepared for it to lock up the server 3. restart server 4. when rollback file is massive, delete it 02:07 MTDiscord you are now a rollback expert 02:28 cheapie wsor4035: VE-C even *has* a script for cleaning up the rollback DB (in a smarter way than that) but at some point the backup script was made to not run it any more :/ 02:29 cheapie It's in scripts/cleanup-rollback.sh if you want it, it removes all entries older than 30 days as well as all entries (any time) from players with the "daily_rollback_cleanup" priv. 02:30 cheapie There's also a cleanup-auth.sh, that one deletes all players (from both the auth and players DBs) that haven't logged in for over a year, or 7 days if they don't have interact, or never if they have spill, mesemaker, areas_high_limit, ui_full, or basic_privs. 06:09 repetitivestrain forgive me if I am mistaken but isn't get_biome_data very inefficient in that it redundantly computes biome heat and humidity, which is already computed by calcBiomeAtPoint 09:22 sfan5 "very inefficient" is overstated but yes it does calculate that twice 09:33 repetitivestrain sfan5: it becomes noticeable when the function is being called >4000 times per globalstep 09:35 sfan5 did you check how much time is spent in the api function? 09:42 repetitivestrain yeah, somewhere on the order of 3500 us per globalstep 09:44 sfan5 that might or might not be okay depending on long the rest of your globalstep is 09:44 sfan5 what I'm saying is "even if it were half of that, would it fix the problem you have?" 09:49 MinetestBot 02[git] 04sfan5 -> 03luanti-org/luanti: Fix shadow flicker on camera offset update (#15709) 13b861f0c https://github.com/luanti-org/luanti/commit/b861f0c5c59546b64e937fdf384634175df4a372 (152025-01-25T09:47:52Z) 09:49 MinetestBot 02[git] 04stefanbeller -> 03luanti-org/luanti: filesys: replace goto by #else to avoid compiler warning 13282c81f https://github.com/luanti-org/luanti/commit/282c81fe3a2533659c48275a260b5e393011da2b (152025-01-25T09:48:15Z) 09:49 repetitivestrain sfan5: it would greatly improve matters, yes 09:50 repetitivestrain Mineclonia has a globalstep budget of 0.05s per step, with 0.035 devoted to pathfinding, leaving 15 ms for other tasks 09:51 sfan5 I see 09:56 sfan5 have you considered if caching could help? 13:10 SwissalpS 81 13:10 SwissalpS oops 13:11 repetitivestrain sfan5: i'm not certain how we would cache the results of get_biome_data, as it's called with randomly generated positions 13:13 MTDiscord SwissalpS: last two digits of your debit card? 😄 13:13 SwissalpS you wish ROllerozxa :D 13:15 * SwissalpS was typing "/4" but his hand didn't move up far enough 14:40 sfan5 repetitivestrain: entirely random? or random loaded blocks? how much precision do you need? is what comes to mind 14:40 repetitivestrain they're random positions selected from amongst currently loaded mapblocks and they should be precise to the block 14:41 repetitivestrain but minor deviations would not be unacceptable 14:43 sfan5 block or node? 14:43 sfan5 (accurate to) 14:47 sfan5 asking because if it needs to be accurate to the block you could reasonably keep a biome cache for all active blocks 14:47 sfan5 s/active/loaded/ 14:48 repetitivestrain Node, sorry 14:49 repetitivestrain i was thinking in minecraft terms 14:57 sfan5 ah, unfortunate then 20:31 shaft I tried to read out damage from on_punch but it's always fucking 0. Instead the damage is only in tool_capabilities. Does any game use this or why is this part of the api if it's always 0? 20:32 shaft If nothing uses it, it should be removed. Confusing last argument that does nothing for no reason. 20:32 shaft on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir, damage) 20:35 ireallyhateirc could be just a bug 20:36 shaft Mineclonia, MTG and Repixture all report 0 20:37 shaft Yes, it could be a bug 20:37 shaft Enginedevs explain this 20:38 ireallyhateirc I checked and the bug doesn't have an issue on github so you may want to report it too 20:39 shaft But is it a bug or intended? Could be an abandoned argument? 20:39 ireallyhateirc returning always 0 is dumb and I see no reason why it'd behave that way 20:40 ireallyhateirc and it appears that it's not documented in any way either 20:40 ireallyhateirc could be just bitrot from old times or something like that 20:50 shaft Hmm. Trying to make a minimal reproducable example, it seems that it's only 0 in my hijack function 20:54 shaft Is it because they are animals? 21:29 shaft I DONT UNDERSTAND IT 21:29 shaft *cry* 21:30 shaft core.register_entity("entity_test:a", { 21:30 shaft initial_properties = { 21:30 shaft visual = "cube", 21:30 shaft visual_size = {x=1, y=1, z=1}, 21:30 shaft textures = {"default_wood.png", "default_wood.png", "default_wood.png", 21:30 shaft "default_wood.png", "default_wood.png", "default_wood.png"}, 21:34 shaft https://gitgud.io/-/snippets/2475 21:34 shaft Can someone help me? 21:36 MinetestBot jemius: Jan-21 01:47 UTC If you want to add to *recent* Minecraft then the Minecraft-clone games are the target; however if you think those games are cluttered, MTG is more minimal 21:37 jemius Does the minetest engine use Vulkan for graphics? 21:37 ireallyhateirc OpenGL apparently 21:38 shaft OpenGL and OpenGL ES on mobile 21:38 rubenwardy shaft: you don't need a table for hijacked_functions, you can have a local in the if statement. Local scope is per execution 21:38 rubenwardy not sure what the specific issue is though, maybe the punch/armor groups don't match up? 21:40 shaft I tried hijacking my entity_test:a and that worked but creatures still have 0 damage 21:40 shaft entity_test:a returned 10 damage because I hit it in creative and it had 10 hp and died instantly 21:40 shaft How do I avoid the function table? 21:42 shaft I mean adding a variable to the entity definition is not any better than another table. 21:42 rubenwardy https://gist.github.com/rubenwardy/6a001ae6cb05fece8b6b58fb55581faa 21:42 shaft It's both one table access 21:43 shaft Oh does that work? How is that language feature called again? 21:43 rubenwardy it's scopes 21:43 rubenwardy variable scope is per invocation 21:44 rubenwardy so each time that if statement body runs, a new local is made 21:46 shaft It's called "closures". I didn't know Lua had it. 21:48 shaft Lua can't easily "generate code". A closere is if a function is bound to a variable together with variables it will use in its body when run. 21:50 shaft Look, I can explain it even though I'm too dumb to use them when sensible. 21:52 MTDiscord A closure is a function with upvalues 21:53 MTDiscord There are some nuances here that you do not want to miss however 21:54 shaft Such as? 21:57 shaft It's good that I'm using the fancy closures now but I still don't understand why damage is 0 for mobs but not my self made entity even though both do take damage and die 21:57 MTDiscord They are mutable and, in a sense, shared 21:59 MTDiscord or more specifically can be shared 21:59 shaft In Lua everything is mutable and can be shared, right? 22:09 MTDiscord wouldn't really say it like that. strings and numbers are immutable values, userdata can decide whether it lets you mutate it. 22:11 shaft Of course, primitives aren't but are in some other languages like Ruby. I said it wrong. 22:12 shaft But being able to mutate not just a variable that holds a number but the number itself is really rare. 22:13 MTDiscord tbh with boxed bignums it can happen but yeah 22:13 shaft Not a primitive in the core of most languages. 22:14 shaft Anyway. How do I find out the real damage or why my damage field is 0? 22:14 MTDiscord do some debugging, see where the data flows, trace it back, print until you find out where it first is 0 22:15 MTDiscord that'll be fifty bucks 22:16 shaft Is it an enginebug? Having hijacked the function, I should be the first one who receives it after all. 22:18 MTDiscord it is an engine bug once you have debugged it to be one. and no that logic doesn't check out, especially not in a modded game. 22:18 MTDiscord one obvious reason why is that you can't guarantee that you're the only hijacker. 22:20 SwissalpS especially not that yours is the first called one. 22:23 shaft I ran this in multiple games with this being the only third party mod. 22:25 SwissalpS the games can hijack too, or their mods 22:26 shaft And what retarded hijack would mobs api, repixture, mcl_mobs all have in common that sets damage to 0 before passing it to me 22:26 shaft ? 22:26 shaft 0, not nil or any other value 22:26 SwissalpS no need for insults 22:27 shaft I haven't insulted anyone. I doubt there is such a hijack 22:28 SwissalpS so with "retarded hijack" you meant to say "delayed hijack"? 22:30 shaft I mean a hijack that doesn't fucks with the values for no reason. Like if someone explicitely writes out the arguments instead of ... or doesn't return the arguments or doesn't pass the arguments on 22:30 shaft But here it's 0 22:31 * SwissalpS is no longer interested in this conversation 22:31 shaft Is damage in on_punch the final damage value the entity takes to it's hp? 22:32 shaft Or do I misunderstand it. 22:34 shaft I've used core.after(2 now. I AM THE ONLY HIJACKER AND I GET 0 AS DAMAGE FIELD FROM on_punch but only for mobs. For my self made entity, i get the real value 22:34 shaft Is it engine or not? 22:35 shaft Is it a bug or is 0 damage and entity dying mutually exclusive 22:48 shaft Since you're going silent on me I filed a bug report: https://github.com/luanti-org/luanti/issues/15717 22:48 shaft What else can I do? 22:49 shaft Clearly the engine is giving me 0. 22:54 shaft Sorry for being rude. It's just frustrating. I'll do something else now.