Valve Source Code 2013 Tutorial (Episode 2.5): Fixing Physgun Bugs

Channel:
Subscribers:
18,200
Published on ● Video Link: https://www.youtube.com/watch?v=HGuk0fNLvWg



Half-Life 2
Game:
Duration: 0:00
476 views
29


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 Physgun tutorial I did nearly 5 years ago and fix some of the issues that I left outstanding at the end of that video. I will be covering how to fix phys-surfing while also resolving a game crash involving welded breakable props, but I'll also show how to add ammo pickups and implement a better reload feature (which also applies to the placing of gravity pellets). The audio from around 12:30 to 14:40 has some remaining noise present that I couldn't remove, this is because I used a new audio recording setup that I recently purchased and it was raining outside at the time of recording! I apologize for any inconvenience this may cause. Anyway, please let me know what you think and see you for whatever I decide to do next, thanks for watching!

Timestamps
00:00 Introduction
01:14 The Causes of the Aforementioned Issues
02:31 Physgun Client-side Code Changes
04:32 Adding the sk_max_gravity ConVar
05:16 Adding Physgun Ammo Item Pickups
07:13 Gravity Pellet Code Changes Part 1
10:05 Basics of a CUtlVector
11:02 Gravity Pellet Code Changes Part 2
13:55 Physgun Server-side Code Changes
23:18 Success?
23:55 Unresolved Issues
24:56 Garry's Mod Object Rotation Feature
25:26 Can the pelletlist_t struct be Removed?
26:30 Outro

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

► Episode 2 (Prerequisite):    • Valve Source Code 2013 Tutorial (Episode 2...  




Other Videos By TheMaster974


2025-10-02Playing a Viewer Requested Half-Life 2 Workshop Map! (Bella Bittersweet: Short Circuit)
2025-09-25Valve Source Code 2013 Tutorial (Episode 14.5): Issues With Burst Fire Weapons
2025-09-22September 2025 Update - What's Been Going On?
2025-09-05Source Mod Showcase #9: HALF-LIFE 2: ReCharged
2025-09-02This Half-Life 2 Mod Takes The Air Out Of Your Ex...Change! (Air Exchange: Revision)
2025-08-26Playing The First Half-Life 2 Mod...In Half-Life 2! (The Thing Remaster)
2025-08-24Valve Source Code 2013 Tutorial (Episode 8.5): Issues With The Source Shader Editor
2025-08-14Source Mod Showcase #8: Missing Information
2025-08-05Valve Source Code 2013 Tutorial (Episode 7.5): VBSP Changes For Custom Shaders
2025-07-28Valve Source Code 2013 Tutorial (Episode 4.5): Why Skybox Clipping Happens [When FOV>90°]
2025-07-22Valve Source Code 2013 Tutorial (Episode 2.5): Fixing Physgun Bugs
2025-07-16Valve Source Code 2013 Tutorial (Episode 0.25): Windows, Linux & VPC Followups
2025-07-11Trying Out Pokémon Blue With The Archipelago Randomizer!
2025-07-05Source Shorts #28 - Modifying Player Effects (Shadows, Reflections and Monitors)
2025-07-02My Thoughts On #stopkillinggames
2025-06-29Source Mod Showcase #7: Half-Life 2 +
2025-06-27June 2025 Update - Lack of Videos, Tutorial Followups & More!
2025-06-09Source Shorts #27 - Modifying The Drainage Rate Of Suit Devices
2025-05-31Valve Source Code 2013 Tutorial (Episode 35): Implementing Hitmarkers/Hitnumbers
2025-05-23Valve Source Code 2013 Tutorial (Episode 34): Adding a Weapon Drop System
2025-05-10Source Shorts #26 - Changing Ejected Brass From Weapons



Other Statistics

Half-Life 2 Statistics For TheMaster974

At present, TheMaster974 has 83,593 views spread across 122 videos for Half-Life 2, and roughly a days worth of Half-Life 2 videos were uploaded to his channel. This is 9.78% of the total watchable video on TheMaster974's YouTube channel.