Fixing the Dropship gun: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(fixed bad link, detailed important change that the replacement file makes, and added a tip to the bottom about community repos)
Line 1: Line 1:
==Introduction==
== Introduction ==
This article explains the process of fixing the Dropship gun's broken rotation.
This article explains the process of fixing the [[Npc_combinedropship|Dropship]] gun's broken rotation in Source.


==Fixing the gun's rotation==
== Fixing the Gun's Rotation ==
Simple copy the content's of this page https://github.com/DKmaster16/HL2_GRAI/blob/master/game/server/hl2/npc_combinedropship.cpp and paste it into npc_combinedropship.cpp, compile your games.sln solution file and then the gun should rotate like it used to.(This fix was created by DKmaster16.)
Copy the contents of [https://github.com/DKmaster16/HL2_GRAI/blob/master/src/game/server/hl2/npc_combinedropship.cpp this page], (courtesy of [https://www.moddb.com/downloads/gameplay-rebalance-ai GRAI+]) and use it to replace {{path|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:
<source lang=cpp>
m_poseWeapon_Pitch = m_hContainer->LookupPoseParameter("weapon_pitch");
m_poseWeapon_Yaw = m_hContainer->LookupPoseParameter("weapon_yaw");
</source>
 
{{Tip|If you're developing a Source 2013 mod, you could opt to use a [https://developer.valvesoftware.com/wiki/Source_SDK_2013_community_repos community repo,] and have bugs like these fixed by default.}}

Revision as of 18:48, 5 December 2023

Introduction

This article explains the process of fixing the Dropship gun's broken rotation in Source.

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.cppYou'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");
Tip.pngTip:If you're developing a Source 2013 mod, you could opt to use a community repo, and have bugs like these fixed by default.