|
|
#1 |
|
Guest
Posts: n/a
|
Flashlight and Suit
Just a quick question this time...
Could anyyone direct me to the code or other file which deals with limiting the flashlight function to the suit - ie. the code which enable the player to use the flashlight only when the player is wearing the HEV suit. Thanks! |
|
|
|
#2 |
|
Guest
Posts: n/a
|
In the functions CHL2_Player::SuitPower_RemoveDevice and CHL2_Player::SuitPower_AddDevice (found in dlls/HL2_Player.cpp) there is a line that checks whether or not the suit is equiped. In both methods simply comment out the return command underneath those if statements and recompile.
This, in theory, allows you to use SuitDeviceBreather, SuitDeviceSprint, SuitDeviceFlashlight, which are all called into being through those functions. However, I think sprint has some other failsafes... I don't know about the breather, though. If you don't care, then you're good. If you do, that's where the suit is stopping the flashlight. You probably couldn't find where the code was because these methods were all called inside of if statement conditionals. A practice that I really discourage. It's too hard to read and doesn't really do anything horribly beneficial. |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks, now I can go and add my own additional suit item
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
There are some fail-safes for the Sprint functionality, but these are all located inside the same HL2_Player.cpp!
So, walk through the code and comment out the IsSuitEquiped() methods and you are going like a fast Gordon Freeman
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|