Skip to content

Conversation

@tsdko
Copy link
Contributor

@tsdko tsdko commented Aug 1, 2025

Prevents clients from having their facing set to east in case they don't send an f packet after connecting. The cause was the x > c.x condition always being hit (any valid X coordinate > -1). Prior to 651597c the extra condition wasn't strictly necessary because north-facing (default, no f sent) clients would've hit c.y < y (-1 < any valid Y coordinate) and have their facing set to north again.


Reproduction steps:

  1. connect with player 1
  2. connect with player 2
  3. ensure they're both in the same room
  4. make player 1 face north
  5. reconnect with player 1 (to reset position to (-1, -1))
  6. reconnect with player 2 (to get server facing instead of client facing)

Facing of player 1 as seen by player 2 after doing all of the above:

Current mastereast
This patchsouth (due to the bug described in ynoproject/ynoengine#67; north on the server)

Prevents clients from having their facing set to east in case they
don't send an `f` packet after connecting. The cause was the
`x > c.x` condition always being hit (any valid X coordinate > -1).
Prior to 651597c the extra condition wasn't strictly necessary
because north-facing (default, no `f` sent) clients would've hit
`c.y < y` (-1 < any valid Y coordinate) and have their facing set
to north again.
@Desdaemon Desdaemon merged commit 6bba353 into ynoproject:master Aug 5, 2025
@tsdko tsdko deleted the skip-facing-on-initial-m branch August 6, 2025 01:23
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.

2 participants