alRex-U / ParCool

A Minecraft Forge Mod for action of Cool Parkour
GNU General Public License v3.0
48 stars 36 forks source link

[Suggestion] Move Stamina and Movement to Serverside Exclusively #214

Closed SaltSouls closed 9 months ago

SaltSouls commented 9 months ago

I'm actually a little confused why the mod has the stamina consumption and maximum on the clientside at all. Things like stamina usage, max stamina, and allowed movement types should all be things that the server should be in charge of handling exclusively, given they can directly affect gameplay and give players advantages over other that don't have things set the same way. Imagine a player set their max stamina to an amount over another players, this would give said player an inherent movement advantage as they could suddenly sprint and perform actions for longer. Things like this can be avoided by just not letting the client modify said settings, and instead have them specifically tied to the server. The client should really only be responsible for doing things like determining if it should play said animations for the player model/camera, rendering the stamina bar, or the controls. All other actions should be handled exclusively by the server. This suggestion goes hand in hand with my other suggestion to make a max stamina player attribute.

alRex-U commented 9 months ago

Server can limit max stamina forcely by using Limitation. Client can only decide how much it uses stamina within limit of Limitation. This is same about stamina consumptions.

You told this was unfair but each players are freely allowed to set how much they want stamina within its limit. If he thought his stamina is lower than others, what he have to do is just to set its value with max value within limit. You may think this system is little confusing. (Actually it is confusing even me.) However the reason I implemented as this is that in fact some players purposely want to set the stamina value low.

Thus I won't integrate all configs to server's one. I am sure so many issues to request me to roll back the changes will be posted if i did

SaltSouls commented 9 months ago

Interesting. I didn't realize this was a requested feature, but yeah, I do find it very confusing. It really makes no sense to have both of these configs doing basically the same thing as each other; only that the server one is acting more as a clamp than an actual config itself. Just seems like it would be less work on your end to only have to worry about these configs applying to one side, rather than trying to make them work between both within limits. Not only that, but leaving this as it is, would make adding a max stamina player attribute basically impossible as I imagine the server stamina limit is used to clamp anything that tries to exceed it, meaning that trying to add extra stamina to the player via an attribute would only allow you to go up to said limit, which players can already do if they just change the configs. That is assuming that this is how the system works. You obviously know the code better than I do.