[TF2] Implement ConVars for player Sniper lasers and improve Sniper laser rendering - #2014
Open
dilbertron2 wants to merge 1 commit into
Open
[TF2] Implement ConVars for player Sniper lasers and improve Sniper laser rendering#2014dilbertron2 wants to merge 1 commit into
dilbertron2 wants to merge 1 commit into
Conversation
3 ConVars (tf_sniper_rifle_laser, tf_sniper_rifle_laser_min_opacity, tf_sniper_rifle_laser_max_opacity) rewrite sniper laser rendering to prioritise smoothness and accuracy increase opacity of laser particle as charge percentage increases add dummy function to tf_weapon_laser_pointer.h to stop CSniperDot::ClientThink from running whenever wrangler is active
|
r/tf2's favorite PR |
|
Honestly I would like to see this in game, even if not on official servers. Then again, they could set it on in Casual mode for a while and see how people react to it. |
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.
Description
This PR gives servers the ability to give all sniper rifles laser sights that indicate where the Sniper is aiming, the lasers also indicate how charged the shot is. While working on this I ended up rewriting the Sniper laser rendering code, which is used for the robot Snipers in MvM. The lasers in both instances appear much more smoothly because of this.
ConVars:
tf_sniper_rifle_laserIf set, all sniper rifles will have a laser sight, similar to Snipers in Mann Vs Machine.tf_sniper_rifle_laser_min_opacityThe minimum opacity of sniper rifle laser sights.tf_sniper_rifle_laser_max_opacityThe maximum opacity of sniper rifle laser sights.You cannot see your own laser when scoped in, or spectating someone who is scoped in. Care has been taken to make sure that robot Sniper lasers in MvM look visually identical to live TF2.
Videos
Player Sniper laser showcase
sniper.laser.PR.1.mp4
Laser smoothness comparison
sniper.laser.PR.2.mp4
INSTRUCTIONS FOR USING
These changes make use of new particles I created (sniper_laser_sight_beam_muzzle & sniper_laser_sight_beam_dot_muzzle) in order to allow for the laser to have its opacity changed and to fit better on the muzzles of the sniper rifles.
This required me to create a new
class_fx.pcffile! This file MUST be placed in the particles folder! The PR will not work without it!class_fx.zip