Time Nick Message 15:04 Krock what 15:13 Jordach tahw 15:14 Krock ‫what 15:14 Jordach ah dear 15:15 Jordach Krock, i did the impossible in #10360 15:15 ShadowBot https://github.com/minetest/minetest/issues/10360 -- Fix/Add First Person Attachments by Jordach 15:15 Krock pretty sure it's impossible without creating more bugs 15:15 Jordach suprisingly no 15:16 Jordach i found an obscure irrlicht rendering mode that can cull specific models as each CAO is given their own material 15:17 Krock please do me a favour and use getSceneNode() to avoid this if/else mess 15:19 Jordach i mean if there was a way to identify what is the actual object i'd use that 15:20 Jordach is it a sprite? a cube? 15:20 Krock why do you need that? ISceneNode defines this function, so if you downcast whatever mesh you have, it'll do the same thing 15:20 Jordach oo 15:21 Krock > bun2 20.04 set up since two weeks 15:21 Krock > yet no worldedit clone. SHAME 15:23 Krock nvm, there is "Minetest-WorldEdit" 15:23 Jordach so getSceneNode()->setMaterialFlag(args) 15:23 Krock no 15:23 Jordach oof 15:23 Krock ISceneNode *node = getSceneNode(); 15:23 Krock then do these calls 15:23 Krock so that you can check against nullptr 15:23 Jordach if(x){} // do 15:23 Jordach that's how it works against the members 15:24 Krock if (!x) return 15:32 Jordach jeez minetest isn't *that* hard to work on 15:38 Jordach Krock, same build, two clients in multiplayer https://i.imgur.com/DopawEZ.png 15:39 Krock left one seems to be a bit offset 15:39 Jordach set_bone_rotation even works on attached entities 15:40 Jordach if i shunt the eye position forwards using set_eye_offset i could probably hide it 15:41 Krock does it also work when attached to a boat or cart? 15:41 Krock also after detaching from it? 15:41 Jordach didn't test that but seeing as it's only change to attachments is visibility in first person 15:41 Krock it's a can of worms 15:42 Jordach i don't actually have MTG installed these days 15:43 Jordach get_attach now returns a 5th item the boolean for first person mode 15:45 Jordach i might have left an unintentional "bug" because attaching the player with the force flag will show the player's mesh in first personm 15:49 Krock that's definitely a bug 15:50 Jordach because when the messages for CAO are read it'll get reset on detach 15:52 Jordach or at least that's the theory 15:53 Jordach attaching the player in first person doesn't break it 15:53 Jordach https://i.imgur.com/kDdnjbX.png 15:53 Jordach works even in third https://i.imgur.com/nWGpiCY.png 15:53 Jordach using player:set_attach(entity, "", vector.new(), vector.new()) 15:54 Jordach setting force first person visible as true for players doesn't actually make their mesh visible in first person 15:55 Jordach Krock, attachments are working as intended 15:57 Jordach even changing camera view modes doesn't break this behaviour 15:59 * twoelk imagines steering wheel movements in vehicles according to direction change 16:03 Jordach and they can be specifically for first person, but will also appear as normal attached entities on other clients :D 16:04 Jordach since now that attachments update their proper local position after armatures 16:04 Jordach you could do proper visible armour 16:04 Jordach or annoy clients by attaching a non culled cube onto their heads so they can't see :^) 16:11 MTDiscord ooh like getting a sack over the head when kidnaped 16:14 MTDiscord that actually sounds like a nice alternative to using a black-out HUD, which can normally be disabled by the client. 16:24 MTDiscord There’s tons of uses for “camera” attached entities 16:27 MTDiscord hm, helmets with restricted view or sunglasses that work as in real life - sort off - ooooh howabout xray glasses to view the animation bones ? 17:49 Krock ( ͡° ͜ʖ ͡°) 5.2.0 stable was 420 commits ago 17:55 MTDiscord Glad to know this useless bot renders the Lenny fine 18:11 celeron55 here's a poem: 18:11 celeron55 %28%20 18:12 celeron55 %u0361%B0%20 18:12 celeron55 %u035C%u0296%20 18:12 celeron55 %u0361%B0%29 18:21 Krock very cool escapes 19:17 celeron55 i might call myself a bit of an escapist 20:28 shivajiva if I register an entity and add it to a world and then move far enough away for it to unload, will it's on_step function continue when I get within range? 20:29 Jordach on_step will resume as normal 20:29 shivajiva and if the server crashes? 20:30 shivajiva can it get orphaned but still appear in the world 20:33 shivajiva say I give it an owner and a uid in the staticdata and have the on_step check the owner has the uid in a global table, would that stop working? 20:34 Jordach it'll always be in world until cleared by /clearobjects 20:36 shivajiva but if it tracks a value in a global to know if it should remove itself in the on_step, is that possible? 20:36 Jordach if x == nil then self.object:remove() 20:37 shivajiva so why would that stop working after a crash or unload 20:37 Jordach in the game you've seen screenshots of entities are entirely cosmetic and self destruct on load 20:37 MTDiscord Lua vars aren't persistent across sessions 20:39 Jordach this 20:39 shivajiva it's reading a global that exists when it reloads but the data has changed so the on_step check should always remove the entity 20:39 shivajiva it doesn't though 20:41 MTDiscord if your goal is to remove an entity after the first reload, load it with staticdata the first time and check for static data in on_activate to remove itself if missing 20:42 shivajiva the goal is to have the entity remove itself when the match table uid it belongs to doesn't match the value passed in staticdata on creation 20:45 shivajiva https://github.com/shivajiva101/eggwars/blob/master/shop.lua#L179 20:48 shivajiva wish I knew what was wrong with that implementation 20:51 shivajiva the uid is utc at match creation so it's never the same match to match 21:00 shivajiva guess I'll have to add some logging to find out what's going on 21:10 shivajiva found it here https://github.com/shivajiva101/eggwars/blob/master/shop.lua#L208 21:10 shivajiva bad expression of the logic I want to test 21:11 shivajiva should be this 'if match.uid ~= self.uid then' 21:16 shivajiva wish I could say that's the first time I found myself writing bad logic *sighs and shrugs* 21:17 shivajiva appreciate the responses anyway :)