mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
Fixed out of bounds error in Shotgun Shot sound hook
This commit is contained in:
parent
a91a0d03c8
commit
fd44ba68b6
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user