Skip to content

Conversation

@themuffinator
Copy link
Owner

Summary

  • snap pmove origin and velocity back to the legacy Quake II 1/8th unit grid before exporting state
  • rely on the existing stuck resolution and remove the custom z<0 stair, jump, and waterjump allowances that are no longer needed

Testing

  • not run (not available in container)

https://chatgpt.com/codex/tasks/task_e_68e44840602883289ce9c34476306be2

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 1345 to 1353
static void PM_SnapPosition() {
pm->s.velocity = pml.velocity;
pm->s.origin = pml.origin;
pml.origin = PM_SnapToLegacyGrid(pml.origin);
pml.velocity = PM_SnapToLegacyGrid(pml.velocity);

pm->s.velocity = pml.velocity;
pm->s.origin = pml.origin;

if (PM_GoodPosition())
return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resnap origin after stuck resolution

The new snapping logic only applies when PM_GoodPosition() succeeds. When G_FixStuckObject_Generic adjusts the player's origin, the code returns immediately without snapping the corrected value back to the 1/8‑unit grid. That means any fix made for a stuck player can be lost when the state is later serialized and implicitly quantized again, putting the player back inside geometry near the world origin—the exact scenario this change tries to avoid after removing the z<0 tolerances. Consider snapping pm->s.origin (and velocity if needed) again after a successful stuck fix so the exported state remains on the legacy grid.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants