The minetest.register_on_joinplayer confuses me a lot.
It seems a lot of functions don’t work when called in this callback.
For example, all hud_ calls do not change anything.
However, if I wrap this stuff in a minetest.after(0, …) it, the HUD is manipulated.
set_physics_override also does not work in this callback.
A minetest.after(0, …) does not help here. I need to go up to 1s to make it work. But this is an extremely ugly hack and I am not sure if it is even reliable.
I suspect that other functions also don’t work when called in this callback.
I need a callback where I have a useful player object which I can fully manipulate. This means, the player has just joined and the player object is inside the world and all player functions are now meaningful. Right after that moment, that callback shall fire. Sadly, register_on_respawnplayer does only fire on respawns, but not for spawn right after the join.
register_on_newplayer sounds promising but I don’t know what it means. What is a “new” player? When exactly does this callback fire?
The register_on_joinplayer function does not seem to provide a fully manipulatable player object, given from my experience. This makes the callback very annoying to use to me.
If there are restrictions for register_on_joinplayer, I want to know which restrictions exist. If you know it, please tell me what I can do with the player object in this callback and which functions I cannot call.
What are the alternatives to register_on_joinplayer?
I am using 0.4.9.
If you can answer any of my questions, please help me. Please also tell me if you have experienced similar problems.