Skip to content

Conversation

@Ashetf2
Copy link

@Ashetf2 Ashetf2 commented Mar 3, 2025

Related Issue

The first part of ValveSoftware/Source-1-Games#4273

Implementation

This pr adds some checks to HandleInspect and some specific checks to tf_weapon_flamethrower, tf_weapon_dragons_fury and tf_weapon_grenadelauncher (for the Loose Cannon)

As said in the source issue tracker, a player can inspect when

  • reloading. the most annoying of all, it interrupts the reload if the player accidentally inspects
  • after firing/deploying, looks weird.
  • when zooming with a sniper rifle. it just doesn't make sense
  • when charging a cannonball

Screenshots

pressing F as hard as I can

Desktop.2025.03.03.-.18.21.35.09.DVR.mp4
Desktop.2025.03.03.-.18.22.12.10.DVR.mp4
Desktop.2025.03.03.-.18.23.50.11.DVR.mp4
Desktop.2025.03.03.-.18.24.32.12.DVR.mp4
Desktop.2025.03.03.-.18.25.58.13.DVR.mp4

Checklist

  • No other PRs implement this idea.
  • This PR does not introduce any regressions.
  • I certify that this PR is my own entirely original work, or I have permission from and have attributed the relevant authors.
  • I have agreed to and signed this project's Contributor License Agreement.
  • This PR targets the tc2-mod branch.
  • This change has been filed as an issue.
  • No other PRs address this.
  • This PR is as minimal as possible.
  • This PR does not introduce any regressions.
  • This PR has been built and locally tested on at least one platform.
  • This PR has been tested on all platforms, on both a dedicated server and on a listen server.

Testing Checklist

Client Server Version
Windows Yep 10
Linux

Caveats

When a player has just finished reloading with single reload weapons (shotgun etc) they can still inspect before the animation finishes. I couldn't get to the root and i think i would have to add more code to the reload code. For now i didn't want to do that. FIXED :D
Also, players with the Classic can inspect first and start to charge the gun or zoom. I haven't check how to fix that.
Maybe i could also add a debug convar but whatever

Alternatives

The checks for TF_COND_AIMING and TF_COND_ZOOMED could be moved to tf_weapon_sniperrifle? I'll check that later, but it works regardless

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.

1 participant