Skip to content
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

Noclip Movement Improvements #2228

Open
6 tasks done
tsa96 opened this issue Dec 15, 2024 · 1 comment
Open
6 tasks done

Noclip Movement Improvements #2228

tsa96 opened this issue Dec 15, 2024 · 1 comment
Labels
Priority: High Something essential that should be done in this release, as soon as possible. Size: Medium Something that may take a few days or so to implement. Type: Enhancement This can improve a system/thing already in place. What: Command/Var This work involves creating a new command/convar (or both) Where: Game This is something for the main game code.

Comments

@tsa96
Copy link
Member

tsa96 commented Dec 15, 2024

Bunch of issues with noclip:

  • Dependent on sv_maxspeed, so speed varies between gamemodes
  • sv_noclipspeed_duck/sprint_modifier cvars have no effect above 1 (can't exceed base speed)
  • At high speeds (~4000 UPS), movement direction goes slightly wonky
  • sv_noclipspeedaccelerate 1 prevents movement in noclip

When zoning maps noclip speed is very important, and I'd like to add sliders for sv_noclipspeed / sv_noclipspeed_duck_modifier / sv_noclipspeed_sprint_modifier to the settings menu. Not being able to use sprint to go faster is very annoying.

I took a stab at this but I'm no good with Source movement. The duck/sprint modifiers I can fix, but couldn't figure out the problem with the wonky movement directions, which will become a more prominent issue as more people are zoning and we add the settings slider. So let's track what I've gotten done and what's remaining:

  • Remove dependency on sv_maxspeed
  • Allow duck/sprint modifiers to exceed base speed
  • Add sliders to settings menu
  • Change sv_noclipspeed_sprint_modifier default from 0.5 to 2.5, add to cvar_defaults.kv3
  • Merged sv_specspeed and related into sv_noclipspeed
  • Fix wonky movement

IMO the sv_noclipspeedaccelerate 1 thing isn't a serious issue and we should close it. Who cares if a non-default value causes you to stop moving? It's a much less important cvar than base speed and duck/sprint modifiers, and doesn't seem worth the effort unless changes to wonky movement (which I think is caused by the accelerate/friction code) happens to fix it.

Natan suggested that sv_noclipspeed should correspond to the exact speed you move at, which is a nice idea, but with current friction behaviour you never reach that exact speed, which seems quite weird. Unless we could change the friction code to avoid that, I think just multiplying sv_noclipspeed by some hardcoded constant instead of sv_maxspeed would be fine. I was considering increasing base sv_noclipspeed a bit anyway, we could just multiply by ~500 instead of 320 or whatever sv_maxspeed usually is and not have to update that cvar default.

Would be good to get this all finished by 0.10.0, again wonky movement issue is going to be exacerbated by people using the sprint modifier.

One last thing, brae worked on some similar stuff a few years ago, but changes weren't merged as they affected P2:CE and we wanted to leave until after movement refactor was finished. Don't think we need much stuff from that PR, but may be worth looking at, see MR #370 on red.

@tsa96 tsa96 added Type: Enhancement This can improve a system/thing already in place. Priority: High Something essential that should be done in this release, as soon as possible. Size: Medium Something that may take a few days or so to implement. Where: Game This is something for the main game code. What: Command/Var This work involves creating a new command/convar (or both) labels Dec 15, 2024
@tsa96
Copy link
Member Author

tsa96 commented Dec 16, 2024

Fixed the clipping thing, incoming PRs will close everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Something essential that should be done in this release, as soon as possible. Size: Medium Something that may take a few days or so to implement. Type: Enhancement This can improve a system/thing already in place. What: Command/Var This work involves creating a new command/convar (or both) Where: Game This is something for the main game code.
Projects
None yet
Development

No branches or pull requests

1 participant