-
Notifications
You must be signed in to change notification settings - Fork 168
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
Improve stamina plugin and runSpeed config option #357
base: master
Are you sure you want to change the base?
Conversation
The current check is unreliable. Almost always players velocity length is higher than his walk speed. How much or less higher depends on walkSpeed config value, so it makes, for example, IsRunning function useless if walk speed is really high, or if difference between walk and run speed are pretty low.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I don't think stripping features, moving them around, or adding new hooks to very -- VERY expensive hooks to touch, will improve anything upon the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I don't think stripping features, moving them around, or adding new hooks to very -- VERY expensive hooks to touch, will improve anything upon the plugin.
I will make some additional commits after you will read and answer about my replies to conversations.
local maxAttributes = ix.config.Get("maxAttributes", 100) | ||
local offset | ||
|
||
if (client:KeyDown(IN_SPEED) and client:GetVelocity():LengthSqr() >= (walkSpeed * walkSpeed)) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current check is unreliable. Almost always players velocity length is higher than his walk speed. How much or less higher depends on walkSpeed config value, so it makes, for example, IsRunning function useless if walk speed is really high, or if difference between walk and run speed are pretty low.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, Velocity:LengthSqr() is always higher than (walkSpeed * walkSpeed)
I'm not sure... why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same applies to Velocity:Length, but I haven't figured out why, despite trying for an hour or something
No description provided.