Valve Source Code 2013 Tutorial (Episode 30.5): Issues And Improvements Regarding Ironsights @TheMaster974
Valve Source Code 2013 Tutorial (Episode 30.5): Issues And Improvements Regarding Ironsights  @TheMaster974
Uploaded December 2025 | Updated September 2026, 14 hours ago
Hello everyone and welcome to a new (probably short) series of videos I do involving the source code from Valve for Half-Life 2, and some guides on how to do stuff with this code. In this episode, I followup on the ironsights tutorial I did around a year ago by (hopefully) resolving an issue where the viewmodel disappears when going through a level transition while using ironsights. This can also happen when saving/reloading the game. I also outline how to implement a better way of checking to see which weapons should have ironsights, as well as how to slow the player down when they use ironsights and how to activate ironsights by using the SecondaryAttack function instead of a keybinding. Please let me know what you think and see you for whatever I decide to do next, thanks for watching!

GitHub page: github.com/TheMaster974/source-code-tutorials

Timestamps
00:00 Introduction
00:23 A better way of implementing the ironsight ability
04:35 Adding ironsight ability via SecondaryAttack
07:14 Adding a delay between entering/exiting ironsights
08:21 Fixing disappearing viewmodels when going through level transitions
11:11 An alternative way to add ironsights?
13:18 Slowing the player down while using ironsights
17:24 Outro

► You can buy me a coffee to support the effort of creating videos on my new channel! -- buymeacoffee.com/gareththegamer
► My new channel: GarethTheGamer -- youtube.com/channel/UC36qEnApR9ua9eDjaRLYcbA

► Episode 30 (Prerequisite): youtu.be/H0c-FQEGTJ8
Valve Source Code 2013 Tutorial (Episode 30.5): Issues And Improvements Regarding IronsightsSource Shorts #1 - Restoring Friendly Fire (Sort Of?)Valve Source Code 2013 Tutorial (Episode 24): Shader Authoring Part 4 [Adding a Dynamic Sky Effect]Valve Source Code 2013 Tutorial (Episode 16): Adding The SLAM & Floating Tripmine FixHammer Tutorial 26 - Setting Up a Bombing Hunter-ChopperAugust 2026 Update - Lack Of Videos Yet (Yet) Again and What I Plan To Do Soon (Hopefully)Source Shorts #4 - Restoring AutojumpingGareth Plays: Halo: Campaign Evolved Part 9 (Keyes)Gareth Plays: Halo: Campaign Evolved Part 12 (The Most Dangerous Game)Gareth Plays: Portal with RTX (Portals Never Looked This Good? + I Try The No Jump Challenge!)Valve Source Code 2013 Tutorial (Episode 33): Adding a Custom Loading Image Dependent On The MapSource Shorts #14 - Restoring The In-game MP3 Player
TheMaster974 |

Valve Source Code 2013 Tutorial (Episode 30.5): Issues And Improvements Regarding Ironsights

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER