jump.tf Forums
Welcome B)

Why bounces work in a 0-2 unit gap (I think)

RNC1839 · 10 · 2320

RNC1839

  • Proficient
  • ****
    • Posts: 499
    • Frags: +0/-0
    • View Profile
This is something that's been bothering me for a while. I could never really understand why it's a 0-2 unit gap, and not something else. Why would Valve add this weird psuedo-ground? It doesn't really do anything positive for the game if you get stopped at 1.xx units above the ground. Originally I thought, well maybe having it there would help smoothing movement somehow, and I thought that the 0-2 was just an off by 1 error and Valve actually wanted a 0-1 unit gap. But that also doesn't explain why it's there, so I just relegated it to Valve being Valve and marked it as an oversight of some sort.

But then, I took a shower.

The psuedo-ground exists for the sole purpose of walking down stairs/slopes.

As you can see in the video below, starting at 40 seconds. The psuedo-ground was added in CSS back in 2004 to stop people from just falling down stairs like an idiot. The idea is after you fall off the ledge you would be some number of units above the ground and fall like normal, so Valve made the ground 2 units taller in a sense. That way you would never leave the ground when going down a slope, thus smoothing out movement and giving us the best bug in all of TF2.



As per usual I could be completely wrong here, but this just makes way too much sense to me to be ignored.


Vexon

  • needs to stop posting
  • *
    • Posts: 1290
    • Frags: +0/-0
  • :}
    • View Profile
I could listen to that guy talk all day
5:01 PM - john | jump.tf: 👌


Ze Ubermensch

  • Newbie
  • *
    • Posts: 14
    • Frags: +0/-0
    • View Profile
I found something interesting but idk if this is what you are looking for.

https://github.com/PistonMiner/TF2Classic/blob/master/src/game/shared/gamemovement.cpp

At line 1859 there's code that teleports players to the ground so they won't fly off downward slopes.
And at line 3774 the game looks at 2 units below the player and if there's anything solid and flat enough it'll say that the player is on the ground, but the comment there said that it should only look 1 unit down so maybe that's an error?
I know nothing about programming so idk if what I'm saying is correct lmfao

Also if the psuedo-ground is true then players should be able to walk up and down the giant edgy slope on spaghetti smoothly right? But I tried it and it's still bumpy.


plep

  • Advanced
  • *****
    • Posts: 639
    • Frags: +0/-0
  • hi
    • View Profile
Also if the psuedo-ground is true then players should be able to walk up and down the giant edgy slope on spaghetti smoothly right? But I tried it and it's still bumpy.

I do believe there is a set limit to the psuedo-ground (if it exists) to explain this.


RNC1839

  • Proficient
  • ****
    • Posts: 499
    • Frags: +0/-0
    • View Profile
I found something interesting but idk if this is what you are looking for.

https://github.com/PistonMiner/TF2Classic/blob/master/src/game/shared/gamemovement.cpp

At line 1859 there's code that teleports players to the ground so they won't fly off downward slopes.
And at line 3774 the game looks at 2 units below the player and if there's anything solid and flat enough it'll say that the player is on the ground, but the comment there said that it should only look 1 unit down so maybe that's an error?
I know nothing about programming so idk if what I'm saying is correct lmfao

That looks like pretty much exactly what's causing it, nice find.

Also if the psuedo-ground is true then players should be able to walk up and down the giant edgy slope on spaghetti smoothly right? But I tried it and it's still bumpy.

The reason that's still bumpy is because it's bumpy, the player clip is there specifically to be bumpy. And the psuedo-ground only tries to smooth things out a little bit and it can never compare to an actual slope.

Spoiler (click to show/hide)


vice

  • Intermediate
  • ***
    • Posts: 156
    • Frags: +0/-0
  • im shit at jumping
    • View Profile

Ladyboog

  • Proficient
  • ****
    • Posts: 405
    • Frags: +0/-0
    • View Profile
    • ladyboog

But then, I took a shower.


I read that with the narrator girl's voice from Avatar ("...then, everything changed when the fire nation attacked")


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
Open jump_spaghooti in hammer at your own peril, you almost crash when you look at that eb ramp thing.



HyperDan

  • Advanced
  • *****
    • Posts: 807
    • Frags: +0/-0
  • Retired Jumper; 2014-2021
    • View Profile