Time Nick Message 00:34 Lone_Wolf https://github.com/minetest/minetest/issues/9344 18:21 sfan5 merging #9327 in 5 minutes 18:21 ShadowBot https://github.com/minetest/minetest/issues/9327 -- Collision temporary fix for issue #6886 by TheTermos 18:30 sfan5 merged 18:46 An0n3m0us I'm having some trouble calling the knockback function; what have I done incorrectly?: https://pastebin.com/d5MhwT4Z 18:48 sfan5 well that's not how you call it, and also not what I meant 18:49 An0n3m0us So how shall I do it? 18:50 rubenwardy you need to override the function 18:50 rubenwardy not call it 18:50 rubenwardy like, reassign it 18:50 rubenwardy functions in Lua are variables 18:50 An0n3m0us Like so?: function minetest.calculate_knockback(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage) 18:51 rubenwardy yeah 18:51 An0n3m0us That's what I already have; 18:51 rubenwardy no, you're calling it 18:51 rubenwardy minetest.calculate_knockback(function(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage) 18:51 rubenwardy != 18:51 rubenwardy function minetest.calculate_knockback(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage) 18:51 rubenwardy that ^ 18:51 rubenwardy is syntatic sugar for 18:51 An0n3m0us Oh no; I meant in my own code; the pastebin code is the changed code. 18:51 An0n3m0us sfan5 said "you should call the existing function instead" 18:51 rubenwardy minetest.calculate_knockback = function(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage) 18:52 rubenwardy override minetest.calculate_knockback as the documentation says 18:52 An0n3m0us That worked! Thanks : ) 18:52 sfan5 here's how it should actually look like https://pastebin.com/anPbHCab 18:53 rubenwardy cache is the wrong word, old_calculate_knockback would be better 18:53 rubenwardy also, is arg a lua keyword? 18:53 sfan5 dunno they use it here https://www.lua.org/pil/5.2.html 18:53 rubenwardy Shouldn't it be old_calculate_knockback(player, ...) 18:54 rubenwardy ahh 18:54 rubenwardy I think arg will be ... in table form 18:54 sfan5 maybe (player, ...) also works then 18:54 An0n3m0us OK, I used that code and changed "cache" to "old" like rebunwardy said; is that OK? 18:54 sfan5 test and see if it works ;) 18:55 rubenwardy https://rwdy.uk/Hzpc6.png 18:55 Krock now again with 5.1 18:55 An0n3m0us Works fine. 18:55 rubenwardy cba 18:56 rubenwardy Krock: I've used this in many mods, I know it works in 5.1 19:00 An0n3m0us @sfan5 your code was giving a few errors; so I've ended up here: https://pastebin.com/1cZtf7KZ 19:00 sfan5 sure that works but the ... had a point 19:01 rubenwardy I also had problems with unpack(arg) in the terminal 19:01 rubenwardy An0n3m0us: try this https://gist.github.com/rubenwardy/723c07b28d964008c4d2c4ff3c28975c 19:09 An0n3m0us sfan5 oh it did? xD I though you put it there meaning, add the rest of the arguments. 19:11 An0n3m0us rubenwardy; yeah, that worked; thanks! 20:48 p_gimeno arg does not work in LuaJIT 21:34 An0n3m0us Does this issue still need to be open?: https://github.com/minetest/minetest_game/issues/2305 22:40 An0n3m0us Is there a way to select individual sounds to play? Like; I would like to use default_cool_lava.1.ogg and it's second variant, but not the third. 22:40 An0n3m0us Here's the code: minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.1})