Security guards reloading their gun Created 3 years ago2020-05-22 01:49:05 UTC by Alexis_of_Steel Alexis_of_Steel

Created 3 years ago2020-05-22 01:49:05 UTC by Alexis_of_Steel Alexis_of_Steel

Posted 3 years ago2020-05-22 01:49:05 UTC Post #344266
Hello folks. I wonder if you know how to get, through programming, security guards (monster_barney) reloading their gun after firing 17 shots. I'm now using Visual Studio 2019 and Solokiller's updated Half-Life SDK that works with VS2019. I think it's possible since barney.mdl contains an animation doing so. But I couldn't find the bunch of code that allow security guards reload their gun :cry: . So, I need your help again!
Thanks in advance,
Alexis.
Posted 3 years ago2020-05-22 11:06:01 UTC Post #344271
If you look at hgrunt.cpp you'll see a CheckAmmo method and checks on CheckAmmo - it seems to be part of CBaseMonster and it's all a bit complicated with the schedules and tasks but it's all there.
Posted 3 years ago2020-05-23 07:11:07 UTC Post #344282
I did it and it worked successfully. Thank you!
Posted 3 years ago2020-05-24 07:37:35 UTC Post #344290
No worries! Clearly it was planned for Barney (and the assassins) at some point but never finished.
You must be logged in to post a response.