AmmoManager: Dont bother hooking what we dont have.
This commit is contained in:
parent
1ed199e1ea
commit
a8c20e5fe2
@ -108,8 +108,11 @@ public void OnEntityCreated(int entity, const char[] classname)
|
||||
{
|
||||
if (strncmp(classname, "weapon_", 7, false) == 0)
|
||||
{
|
||||
DHookEntity(g_hGetMaxClip, true, entity);
|
||||
DHookEntity(g_hGetMaxReserve, true, entity);
|
||||
if (g_hGetMaxClip != INVALID_HANDLE)
|
||||
DHookEntity(g_hGetMaxClip, true, entity);
|
||||
|
||||
if (g_hGetMaxReserve != INVALID_HANDLE)
|
||||
DHookEntity(g_hGetMaxReserve, true, entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user