Minor improvements to various plugins

This commit is contained in:
Jackzie 2020-10-10 10:41:25 -05:00
parent 51a6841e78
commit dc4e938ae6
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
5 changed files with 8 additions and 8 deletions

View file

@ -52,7 +52,7 @@ public Action CheckTimer(Handle timer) {
static int timer_update_pos;
if(GetClientCount(true) == 0) return Plugin_Continue;
for(int i = 1; i < MaxClients; i++) {
if(IsClientConnected(i) && !IsFakeClient(i) && bIsSurvivorClient[i]) {
if(IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && !IsFakeClient(i) && bIsSurvivorClient[i]) {
bool usingMinigun = GetEntProp(i, Prop_Send, "m_usingMountedGun", 1) == 1;
bool usingMountedWeapon = GetEntProp(i, Prop_Send, "m_usingMountedWeapon", 1) == 1;
@ -67,7 +67,7 @@ public Action CheckTimer(Handle timer) {
}
for(int bot = 1; bot < MaxClients; bot++) {
if(IsClientConnected(bot) && IsFakeClient(bot) && bIsSurvivorClient[bot]) {
if(IsClientConnected(bot) && IsClientInGame(i) && IsFakeClient(bot) && bIsSurvivorClient[bot]) {
float botPos[3];
GetClientAbsOrigin(bot, botPos);