pandorabox-io / in-game

Random code and stuff for in-game things
MIT License
3 stars 0 forks source link

Jumpdrive and /sethome - player position outside radius when standing on (slab)/luac #283

Open SwissalpS opened 2 years ago

SwissalpS commented 2 years ago

Needs to be confirmed: MCLV reported that his /home is not always moved with JD. Sometimes relogging seems to fix the situation.

So may not be a JD mod bug, why I didn't report it there.

Edit: test with R1, seems to happen more often then.

SwissalpS commented 2 years ago
<MCLV>
I've done quite some testing and I think I figured something out about the /home position someone needs to change a - to a + some where in the code

after the /home I seem to be at the wrong position.(too low)

My scoutship has a luacontroller at the very bottom of the R1 radius and I'm "standing" on that when I issue /sethome (I'm actually flying)

so I should be at least 3/16 higher than the outside of the radius.
but when I jump the ship and issue /home I'm exactly 3/16 lower then the outside of the radius
it seems that the height of the luacontroller is substracted from my height instead of added
logically it shouldn't matter, but that is what it seems like

sounds like this is more of a /sethome and /home issue than JD

SwissalpS commented 2 years ago

https://github.com/minetest/minetest_game/blob/b0cf06136013aa1cd9cee92747071c4dd4ac17fd/mods/sethome/init.lua#L33

SwissalpS commented 2 years ago

looks sane too: https://github.com/mt-mods/jumpdrive/blob/master/compat/sethome.lua

SwissalpS commented 2 years ago
<MCLV> jd is currently at y=140. I'm standing on the lucacontroller and my y pos reads 138.7 so I'm not inside the radius

standing on slab floor of JD seems to be a bad idea for both jumping and /sethome ;p

OgelGames commented 2 years ago

Adding 0.5 to each side should fix this, then the measured radius will reach to the edges of the nodes, instead of to their coordinates.