So so far using SDKHooks I hooked "player_builtobject" and can check if the built building is a Sentry and if it has m_bMiniBuilding=1 which means it is a Minisentry. I also managed to successfully access its maxHealth via
Code:
SentryMaxHealth = FindSendPropOffs("CObjectSentrygun", "m_iMaxHealth");
[...]
SetEntData(object, SentryMaxHealth, 90);
and all that for example works fine.
Now the problem is that I want to change its actual health when it starts building. In particular I'd like to set it so it behaves like every other Engineer building - start at 1 HP and linearly increase to its max health when it finishes building. The Minisentry however keeps resetting its m_iHealth to full no matter what I change it to.
How do I get Minisentries to not constantly reset their health to full while building? And is there some hidden cvar affecting this?