add GetPlayerCameraTargetNPC (#1261) - #1267
Open
Xleone1 wants to merge 1 commit into
Open
Conversation
Implements FCNPC parity: returns NPC id the player is looking at (center of screen) when EnablePlayerCameraTarget is enabled. Reuses cameraTargetPlayer_ and filters isBot + streamed + INPC lookup, matching existing GetPlayerCameraTargetPlayer logic. - SDK/include/player.hpp: forward INPC, virtual INPC* getCameraTargetNPC() - Server/Source/player_impl.hpp: include NPCs, declare override - Server/Source/player.cpp: implement filter - Server/Components/Pawn/Scripting/Player/Natives.cpp: SCRIPT_API GetPlayerCameraTargetNPC - Server/Components/CAPI/Impl/Players/APIs.cpp: OMP_CAPI Player_GetCameraTargetNPC Tested: ninja 158/158, pawn compile 0 warnings, /spawnnpc /cnpc in-game.
Xleone1
force-pushed
the
feature/getplayercameratargetnpc
branch
from
September 1, 2026 19:07
e5d1c77 to
36d8183
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements FCNPC parity: returns NPC id the player is looking at (center of screen) when EnablePlayerCameraTarget is enabled. Reuses cameraTargetPlayer_ and filters isBot + streamed + INPC lookup, matching existing GetPlayerCameraTargetPlayer logic.
Tested: ninja 158/158, pawn compile 0 warnings, in-game /spawnnpc /cnpc /despawnnpc /togglecamtarget.
Closes #1261.