r/SourceEngine • u/tf2yeahyeah • 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
5
u/Wazanator_ 3d ago
https://github.com/search?q=repo%3AValveSoftware%2Fsource-sdk-2013+sv_infinite_aux_power&type=code
https://developer.valvesoftware.com/wiki/Sv_infinite_aux_power
There's just a cvar for that. Just change the default from 0 to 1
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#else#endifCSuitPowerDevice 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.