Removing armor HUD indicator? Created 1 month ago2021-09-19 13:22:34 UTC by Loke Loke

Created 1 month ago2021-09-19 13:22:34 UTC by Loke Loke

Posted 1 month ago2021-09-19 13:22:34 UTC Post #345942
Hi.

Anyone know if it's possible to remove the armor HUD indicator so it doesn't show up in the game? I'm currently making a singleplayer mod and the player lacks the ability to equip armor so the armor indicator feels a bit redundant.
I'm using Solokiller's updated Half-Life source code.

Thanks for any help and I hope everyone's staying safe.
Posted 4 weeks ago2021-09-20 02:11:53 UTC Post #345944
Yep, there's a few ways to do it, but the quick and dirty way is to just never draw the battery HUD element. Comment out this one line so that this method always returns at the start of the method:
https://github.com/SamVanheer/halflife-updated/blob/master/cl_dll/battery.cpp#L87
int CHudBattery::Draw(float flTime) { //if ( gHUD.m_iHideHUDDisplay & HIDEHUD_HEALTH ) return 1; ...
Another option is to completely delete the CHudBattery class and fix up any references to it.
Penguinboy PenguinboyHaha, I died again!
Posted 4 weeks ago2021-09-20 15:59:25 UTC Post #345945
Thanks, that worked great!
Posted 1 week ago2021-10-12 22:01:57 UTC Post #345970
it is interesting
You must be logged in to post a response.