New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow player entities to be switched to server-side authority #8567
Comments
Forum page added for feature discussion: https://forum.minetest.net/viewtopic.php?f=5&t=22633&p=347975 |
Yes, give server owners and game designers finally a way to directly manipulate player controls. The hacky way via entities is bad and tedious. It also leaves a lot of room for errors when trying to implement it (for example forgetting to delete the entity and therefore filling the map with garbage data). I also don't understand the viewpoint of some that servers should never have full control over players. Maybe they don't see what kind of control server staff already got. We can:
...and more But when it comes to controlling player velocity and acceleration on a server directly people don't want to allow it? Sorry but I don't follow that logic. |
Related: #3208
The example shouldn't be a problem with
So in what way would physics overrides be better than player attachment?
This wouldn't be better than setting Also note that doing thing like knockback with this would be horrible. |
@DS-Minetest - What is 'static_save = false' referring to ? also the jailed players is an example and why would using this flag be bad for knockback ? please explain ? |
In object properties: Lines 5709 to 5713 in a1459a9
The object isn't there anymore when it's unloaded and won't come back which means that forgetting to delete it won't fill the map with garbage data.
Using this flag for knockback would mean that the player can't move for a certain period of time. And this period is depends on the connection latency to the server. This means that it is possible that a player hits another one and 5 seconds later the punched player can't control and has a certain velocity and this state of awkwardness can take many seconds. |
@DS-Minetest - Thanks for the 'static_save' information. Knockback for example would only affect the player for 0.5 seconds before returning control, this would be enough time to push the player in a certain direction and regain control. player set_velocity and set_acceleration is an important funciton that we currently lack. |
I would also like to add that using entities to attach players and move them is really laggy, even on a server with no mods. During a lag spike the player that's attached will keep moving in the direction before the lag, and not stop. A good example is minecarts. Sometimes while going around a turn the player and cart keeps moving off the rails and in the wrong direction. Also, many vehicle mods or airship mods all have the lag problem. And I do not think that player control should be disabled while being "knocked" back. If this lag were to happen during pvp, it would really ruin it. I think minetest's knockback should be as similar as possible to minecraft's knockback. Only lasting fractions of a second, non laggy, and the player can move during it. Imagine all the great things you could do with KB, sumo, pvp battles and tnt blasts would all be fun things! |
|
Woah, a working, simple, usable knockback mod? I don't care how bad you think it is, this is incredible! It actually works! I'm amazed! Can I slow down the speed of the knockback? |
How good a knockback mod works depends on the server latency. Knockback should actually just add an impulse (a velocity) to the player and not set the player velocity, teleport the player, give the player an acceleration in a direction or similar stuff. I still do not understand how disabling player controls is needed. I guess the thought was that currently giving the player a velocity is only possible by attaching him to an object and then the player can't move and that this means that the reason why setting or adding player velocity server side isn't possible lies in the controls. |
It was said before that using functions like set_velocity and set_acceleration on a player would cause lag due to player controls, so I thought that disabling such controls would help the issue and allow for the player entity to be treated and moved just like a normal entity. Also, LoneWolfHT - simple but effective knockback feature using raycasting :) nice. |
This is better described as allowing server-side authority for player entities
Citation please, I don't think this has ever been said |
Afaik, with this is meant that the player has a velocity that is gotten with ssm, then the ssm adds a velocity and sets the velocity, until it's sent, the player has local on its client another velocity that would be gotten, then the new velocity is not the velocity added. Example
|
It was long long ago when I read about that on IRC ... I cannot find relevant logs right now and I also don't remember if those people actually were core devs, so I edited my comment. |
Celeron55 would agree with you, his rough quote was something like: 'The design of MT is that servers have all possible control'.
I agree.
I agree, just an instantaneous added velocity is needed. After all, players can use controls to move around during falling or jumping. However, this feature request may be useful, and it's fine for a server to override player controls. |
Shouldn't knockback be calculated by the client? I mean if its all server side then it will be slower and glitchier, right? Maybe the client gets word that your player was punched, and because the client already has the position of the puncher it can calculate the KB based on that and send position updates to the server. |
Having the client do the movement would be ideal, hopefully without the need of a csm mod. |
|
Would it be possible to add a new flag to player overrides that allows mods to switch player control on/off, and when off the set_velocity and set_acceleration functions work with player model ?
e.g.
Note: This would also be a handy jail function for naughty players :) and player knockback.
2nd Note: Being able to move player without locking movement would be much better :)
The text was updated successfully, but these errors were encountered: