-
Notifications
You must be signed in to change notification settings - Fork 16
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
No ghost bunnyhopping + landing slowdown rework #857
base: master
Are you sure you want to change the base?
No ghost bunnyhopping + landing slowdown rework #857
Conversation
…tead keep track of whether player is carrying a weapon_ghost
static constexpr float RECON_SPRINT_SPEED_MODIFIER = 0.75; | ||
static constexpr float OTHER_CLASSES_SPRINT_SPEED_MODIFIER = 0.6; | ||
speed /= m_iNeoClass == NEO_CLASS_RECON ? RECON_SPRINT_SPEED_MODIFIER : OTHER_CLASSES_SPRINT_SPEED_MODIFIER; | ||
static constexpr float RECON_SPRINT_SPEED_MODIFIER = 1.35; |
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.
Isn't this defined in a header somewhere?
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.
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.
#define NEO_RECON_SPRINT_SPEED (NEO_BASE_SPRINT_SPEED * NEO_RECON_SPEED_MODIFIER) |
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.
technically this is the NEO_SPRINT_MODIFIER which has a value of 1.6, but recons have a different sprint modifier to the other classes
NEO_RECON_SPRINT_SPEED has a value of 272 if I'm not mistaken
(Edit) perhaps they have the same sprint speed modifier, I'm not going to pretend I know how to dive into the dll of the original game and get the exact values, but following the calculations here https://steamcommunity.com/sharedfiles/filedetails/?id=281690103 and ones ive taken myself I can say with confidence that assuming recons have a different sprint speed modifier is a decent enough way of getting the correct speed
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.
Nagrywanie.ekranu.2025-01-29.174832.mp4
Here is a recording of the sprint speed of a recon in the original after removing all weapons (hence why the viewmodel is slightly off), the value of 272 is 2 units off and we're currently using the speed with a knife or other very light weapon as the base speed anyway (which despite Agiels protests I don't think is really an issue).
static constexpr float OTHER_CLASSES_SPRINT_SPEED_MODIFIER = 0.6; | ||
speed /= m_iNeoClass == NEO_CLASS_RECON ? RECON_SPRINT_SPEED_MODIFIER : OTHER_CLASSES_SPRINT_SPEED_MODIFIER; | ||
static constexpr float RECON_SPRINT_SPEED_MODIFIER = 1.35; | ||
static constexpr float OTHER_CLASSES_SPRINT_SPEED_MODIFIER = 1.6; |
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.
Ditto
static constexpr float RECON_SPRINT_SPEED_MODIFIER = 0.75; | ||
static constexpr float OTHER_CLASSES_SPRINT_SPEED_MODIFIER = 0.6; | ||
speed /= m_iNeoClass == NEO_CLASS_RECON ? RECON_SPRINT_SPEED_MODIFIER : OTHER_CLASSES_SPRINT_SPEED_MODIFIER; | ||
static constexpr float RECON_SPRINT_SPEED_MODIFIER = 1.35; |
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.
Ditto
static constexpr float OTHER_CLASSES_SPRINT_SPEED_MODIFIER = 0.6; | ||
speed /= m_iNeoClass == NEO_CLASS_RECON ? RECON_SPRINT_SPEED_MODIFIER : OTHER_CLASSES_SPRINT_SPEED_MODIFIER; | ||
static constexpr float RECON_SPRINT_SPEED_MODIFIER = 1.35; | ||
static constexpr float OTHER_CLASSES_SPRINT_SPEED_MODIFIER = 1.6; |
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.
Ditto
I had a look at the slowdown in OGNT again and it's slightly more convoluted than I remember.
|
I agree. One of 55 or 75 is probably a typo anyway. I guess making it 75 would be the least noticeable? Unless that would interfere with crouchwalk or something. What's the slowest speed you can reach currently by crouch/walking/aiming? I wouldn't mind making it 55 either, but that'd probably make bhopping harder. |
Alternatively, apply the jump slowdown first, and cap it at 75. Then do the walk/crouch/aim modifiers after and cap to whatever feels good. |
in the original you crouch walk with a pz at a speed of 60.75, and aiming in brings your speed back up to 75. I think back we thought the min speed was 56 so in rebuild aiming in lowers your speed to 56. Regardless of what the speed is after landing we bring it back up to at least 56 at the end |
Right, so we probably shouldn't cap it at 75 then. Best to do the jump slowdown first at 75, and then apply walk/crouch/aim and cap at 55. |
I assume we want the weapon slowdown done before the jump slowdown? Also (Edit) no need for that division tbh |
constexpr float SLOWDOWN_TIME = 1.15f; | ||
if (timeSinceLanding < SLOWDOWN_TIME) | ||
{ | ||
speed = MAX(75,speed * MAX(0.01, 1 - (((SLOWDOWN_TIME - timeSinceLanding) * 35) * 0.05))); |
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.
If you want to contract it further. 35 * 0.05 = 1.75.
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.
maybe we don't need the inner max as well, it shouldn't make a noticeable difference right?
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.
Probably not. And with the outer if-statement it shouldn't blow up in the wrong direction.
I realized something else though. In OGNT it's timeSinceJump but here it's timeSinceLanding. We'll want to subtract the air time from SLOWDOWN_TIME.
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're right, walking off of a ledge in the original does not cause a slowdown
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.
Oh yeah, that's going to be annoying...
…s only applied when ducked and unducking, same as in the original
Description
This PR does two things.
This PR also includes the fixes to player speed when forced to duck from PR #846
Toolchain
Linked Issues