Open player.cpp and look for gmsgAmmoX definition
we need to change that 2 to -1
then look for the function SendAmmoUpdate
we need to edit those WRITE_BYTE from the message and change them to WRITE_SHORT, also change the 254 to 999(the new ammo limit, now just limited by the HUD)
then we need to open ammo.cpp and go to the ammox function
we need to change the READ_BYTE to READ_SHORT
with that now the client receives the information of the ammo, up to 65,535 theorically but you need to modified the HUD in order to expand the digits shown.
That is very useful, much appreciated c:
I hope so, I tried to find why the ammo hud didnt accept more ammo for a good time
I'm glad to see this game as more mod support than any other recent valve game.
I tried to mod in source engine but I could not even compile a simple mod everything seems broken with the source sdk
are you sure you are doing the "updated" stuff? Valve broke some mods after steampipe update, so almost anything before 2011 is pretty much broken (including tutorials)
I stop trying and just go goldsource :)
This is really useful for me! Thanks! I'm going to start game modding soon and I thought of making a Half-Life mod. Very useful stuff for weapons like Minigun and etc. Can I do the same limit removal stuff for health and armor digits?
The health uses this message
MESSAGE_BEGIN( MSG_ONE, gmsgHealth, NULL, pev );
WRITE_BYTE( iHealth );
MESSAGE_END();
and is a byte to so if you change it to short and all the other stuff you can allow it to send a higher number
Not working, sorry. After making these changes, the HUD always shows 0 ammo.
this changes are for the server to send info to the client, these do not include changes on the HUD itself, that would be a next step to do