Fix targeting marker staying on screen after death#5085
Open
TheCrazy17 wants to merge 1 commit into
Open
Conversation
… screen until respawn
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.
Summary
Clears the player's aim target when they die, so the targeting marker over a ped/player doesn't stay on screen until you respawn.
Motivation
If you die while aiming at a ped or player, the targeting marker keeps being rendered even though you're dead, and it only goes away once you respawn. This happens because the engine hides the marker based on whether you still have an aim target set, and nothing was clearing that target when the player died.
Fixes #667
Test plan
Aim at the ped, then kill yourself.
Optionally set the camera to look straight at the ped so the marker is already visible when you die.
Before the fix, the marker stays on screen after death until you respawn. After the fix, it disappears the moment you die.
Also checked that the marker still shows up normally while aiming and alive.
Checklist