Fixing the Dropship gun
Introduction
In Half-Life 2, at launch (2004) to Source 2006, the Dropship gun rotation was functional, but after Valve ported Half-Life 2 to the New Engine (since Source 2007/Orange Box), the Dropship gun rotation was completely broken, preventing it from shooting unless the player stands in the front of the Dropship. This issue was fixed on PC in 2022, but remains unfixed on console port (, ), aswell as the SDK itself (Source SDK Base 2007, Source SDK Base 2013).
This article explains the process of fixing npc_combinedropship gun rotation being broken in Source engine.
Fixing the Gun's Rotation
Copy the contents of this page, (courtesy of GRAI+) and use it to replace src/game/server/hl2/npc_combinedropship.cpp
— You're done!
Alternatively, if you wish to edit the code, the main change it does is add these two lines at the top of CNPC_CombineDropship::UpdateContainerGunFacing, immediately following the assertion statement:
m_poseWeapon_Pitch = m_hContainer->LookupPoseParameter("weapon_pitch");
m_poseWeapon_Yaw = m_hContainer->LookupPoseParameter("weapon_yaw");