Fixed out of bounds error in Shotgun Shot sound hook

This commit is contained in:
shavit 2018-12-23 20:41:11 +02:00
parent a91a0d03c8
commit fd44ba68b6

View File

@ -2559,6 +2559,12 @@ public void Weapon_Fire(Event event, const char[] name, bool dB)
public Action Shotgun_Shot(const char[] te_name, const int[] Players, int numClients, float delay)
{
int client = (TE_ReadNum("m_iPlayer") + 1);
if(!(1 <= client <= MaxClients) || !IsClientInGame(client))
{
return Plugin_Continue;
}
int ticks = GetGameTickCount();
if(gI_LastShot[client] == ticks)