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

Scale the view weapon to prevent intersection with walls #319

Merged
merged 4 commits into from
Sep 25, 2023

Conversation

apanteleev
Copy link
Collaborator

Following up on #318

…oving it backwards when the player faces a wall, which fails in front of dynamic objects, adjust the scale of the gun to make it tiny. See cl_gunscale. Flashlight offset is also tuned to match the new default gun scale and is now controlled through cl_flashlight_offset.
@res2k
Copy link
Contributor

res2k commented Sep 19, 2023

Shouldn't the v_flareg case be adjusted to gun.scale *= 0.3f; (*= instead of =)?

Generally seems to work well. I agree to the lighting differences not really being noticeable "unless you look for it".

If you set more extreme scale values (eg 0.01), the gun isn't just "slightly shifting on screen", it's doing quite the funny stuff.
Might be interesting to see why that is... but the current default generally looks fine, so IMO some explanation would just be "nice to have".

@res2k
Copy link
Contributor

res2k commented Sep 19, 2023

@WatIsDeze, if you could also look how this behaves in the corner case(s) you found, that would be grand!

@apanteleev
Copy link
Collaborator Author

Changes were made, thanks for the feedback @res2k

@apanteleev apanteleev merged commit 64a3b88 into master Sep 25, 2023
2 checks passed
@apanteleev apanteleev deleted the gun-scale branch September 25, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants