Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server/gamestate): freecam status natives #3068

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tens0rfl0w
Copy link
Contributor

Goal of this PR

This PR introduces two new server natives:

  1. IsPlayerInFreeCamMode

    • Allows to check if a player is in free cam mode (i.e. not using the main game camera / having a camera offset from the players ped position).
  2. GetPlayerFocusPos

    • Retrieves the current focus position of a player's camera, representing the game state area currently synced with the player's client.

How is this PR achieving the goal

Reading data from CPlayerCameraDataNode and returning the relevant information.

This PR applies to the following area(s)

FiveM, RedM, Server, Natives

Successfully tested on

Game builds: 3258

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

/

@github-actions github-actions bot added RedM Issues/PRs related to RedM invalid Requires changes before it's considered valid and can be (re)triaged labels Jan 15, 2025
Copy link

@martonp96 martonp96 left a comment

Choose a reason for hiding this comment

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

Looks good, thank you.

@martonp96 martonp96 added ready-to-merge This PR is enqueued for merging and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR is enqueued for merging RedM Issues/PRs related to RedM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants