better slope handling possibly maybe#160
Conversation
Vehicle modes (isFlying/isShip/isWave/isBird/isDart) must not accumulate slope state — isOnSlope, wasOnSlope, currentSlopeAngle, and slopeVelocity are wiped to 0 before any slope hit results are applied. This prevents the polluting flags from contaminating collision tracking on the next frame, which was causing unexpected player deaths every time a ship/wave/bird/dart-mode touched ground after a slope run.
1. Hazard sorting priority (player.js:2034–2048) Moved _colType === hazardType to the absolute first branch inside _broadPhaseHit so no earlier portal/coin/ring handler 'continue' can skip a death check. Old duplicate block removed from mid-chain. 2. Ball velocity symmetric clamp (player.js:1850) Replaced asymmetric if/else clamped at +/-30 for gravityFlipped only with a single Math.max(-30, Math.min(30, velocity)) that constrains both branches identically, preventing pad-launched balls from entering out-of-bounds clipping bands. 3. QueuedHold release safety (player.js:1812) Added this.p.queuedHold = false inside the _updateFlyJump flight path whenever this.p.upKeyDown reads false and the player is not yet falling, so jump-ring buffered input never fires on a key release frame.
Insert vehicle override (isFlying/isShip/isWave/isBird/isDart) directly inside the slope detection loop, immediately after _floorSlopeHit and _ceilingSlopeHit assignment. This gives the override access to local variables (_surfY, _playerRadOnSlope) and lets it continue past the slope processing. Overrides resolve position, set ground state, wipe slope flags, and nullify the hit object so the post-loop block is skipped for these modes.
4339726 to
0ed776c
Compare
- Wave/dart now slide on slopes instead of dying (matching decompiled GD behavior) - Inside-slope death now checks mode type instead of objid restriction
…o better-geometrical-slope-handling
|
ok i fixed conflicts |
|
now the slope have like a launch when you get off them and ship slopes kinda work |
|
ok this pr suck rn im converting to draft |
|
i know this is still a work in progress but this froze my pc entirely when i tried to run it |
|
works fine on my laptop but i'll check |
|
prob has smth to do woth 3.1gb RAM usage... |
|
made a github pages thing in case u want to test without putting on localhost |
|
Very cool! :) |
|
ty! |
d1b122e to
9664ecb
Compare
|
jumping off slopes doesnt feel right, but the rest is amazing! |
|
ty! i know as of right now when u jump of it slope, its snaps the cube back on the slope so u never end up actually jumping off of it |
|
slopes kill you when your upside down because only the blue block hitbox interacts with it |
|
wait tysm i've been trying to figure ts out for like 2 days |
no I meant you jump too far when you jump off the edge, but now I notice that too |
|
oh ok |
a6bfde8 to
f731f71
Compare
ok i think i fixed this |
No description provided.