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