Skip to content

Fix wrong FL_ONGROUND flag on player spawn - #2126

Open
Rainyan wants to merge 7 commits into
NeotokyoRebuild:masterfrom
Rainyan:bug/recon-water-superjump
Open

Rainyan wants to merge 7 commits into
NeotokyoRebuild:masterfrom
Rainyan:bug/recon-water-superjump

Conversation

@Rainyan

@Rainyan Rainyan commented Sep 11, 2026

Copy link
Copy Markdown
Member

Description

Fix a problem with FL_ONGROUND flag being set unconditionally server side for CNEO_Player::Spawn when calling into its base class. This would not always hold true, the most notable issue being #1969 . Another weird edge case would be spawning late into a round, and being able to recon-superjump if you do it before landing on the ground for the first time from a mid-air spawnpoint.

Also refactoring some old related code to be shorter and nicer.

Test map (OGNT compatible)

dev_swimspawn.zip

Should be able to superjump (parity):

  • On dry land
  • On feet-deep water

Should not be able to superjump:

  • When fully submerged
  • On waist-deep water
  • On the surface of the water
  • When "walking" on the bottom of the deep water pool

Toolchain

  • Windows MSVC VS2022

Linked Issues

Move to neo_player_shared
Manually verify ground entity presence for the water jump case. This
fixes the issue with waterjumping, but doesn't address the underlaying
problem, which seems to be that we spawn with stale FL_ONGROUND value,
which causes IsAllowedToSuperJump to incorrectly pass the IsAirborne
check. This also means that one can superjump upon spawning for
non-freezetimed rounds (like warmup), if they are fast enough to do the
superjump before landing. Will address the actual problem in next
commit.
BaseClass of server CNEO_Player class will set FL_ONGROUND
unconditionally at Spawn. This is not necessarily true, and will fail
most notably for the case where the player spawns in and above a pool of
water. Having the FL_ONGROUND be incorrect will then subsequently break
checks for Airborne-ness for the recon superjump, effectively allowing
the recon to superjump from above the surface of the water, until they
first land on a true ground surface to sync their ONGROUND flag with
reality.

Another bugged case would be spawning high in the air, during warmup or
mid-round where there might be no freezetime, whereby the recon could
superjump mid-air if they were quick enough to do it before touching the
floor.

Client side seems to not set the FL_ONGROUND flag in this way, so the
fix is only needed server side.

Also reverting the previous 9c0b04f hotfix because this commit
obsoletes it.
Height can differ by class (supports)
@Rainyan
Rainyan requested a review from a team September 11, 2026 00:17
because this only matters for players
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A recon should not be able to super jump in water

1 participant