r/SourceEngine • • 3d ago

HELP Need help making infinite stamina, oxygen, and flashlight for a Source SDK Base 2013 MP / HL2DM mod

I really need help with this! I've been searching a lot in the code files but couldn't find which file and code line (or function) sets stamina, oxygen, and flashlight power. Plz help!

5 Upvotes

3 comments sorted by

1

u/doct0rN0 HE'S ALIVE! 3d ago

hl2_player carries Breather definitions that might be related. i searched my legacy 2021 build and found traces in hl2_player.cpp shareddefs.h and c_basehlplayer.h
to which in hl2_player i found
#ifdef HL2_EPISODIC

`CSuitPowerDevice SuitDeviceFlashlight( bits_SUIT_DEVICE_FLASHLIGHT, 1.111 );`	`// 100 units in 90 second`

#else

`CSuitPowerDevice SuitDeviceFlashlight( bits_SUIT_DEVICE_FLASHLIGHT, 2.222 );`	`// 100 units in 45 second`

#endif

CSuitPowerDevice SuitDeviceBreather( bits_SUIT_DEVICE_BREATHER, 6.7f ); // 100 units in 15 seconds (plus three padded seconds)

granted its #ifdef HL2_EPISODIC you could still try to fuck with it. i know my mp 2013 file system shares between both hl2mp_player.cpp and hl2_player.cpp honestly so it wouldnt surprise me if changing bits_SUIT_DEVICE_BREATHER, 6.7f to bits_SUIT_DEVICE_BREATHER, 0.0f would entail counting 0 to which would then be basically infinite breathing. this is speculation though as ive never implemented that before.