Permalink
Browse files

Removed double valid check in random teleporter

IsPlayerAlive should TTT_IsPlayerAlive
#325
  • Loading branch information...
Bara committed May 14, 2018
1 parent 7922f09 commit 055b0049f98b2ae9c13aa92cffda7dff06b6c645
@@ -606,7 +606,7 @@ stock int TTT_GetRandomPlayer(bool alive = true, int role = -1)
LoopValidClients(i)
{
if (alive && !IsPlayerAlive(i))
if (alive && !TTT_IsPlayerAlive(i))
{
continue;
}
@@ -176,11 +176,6 @@ int RandomTeleport(int client)
CPrintToChatAll("[Random Teleport] Target: %d Valid: %d", target, TTT_IsClientValid(target));
}
if (!TTT_IsClientValid(target))
{
return -1;
}
if (TTT_IsPlayerAlive(target))
{
GetClientAbsOrigin(client, fPlayerPos);
@@ -373,6 +373,7 @@ void TickTurret(int client)
GetEntPropVector(g_iTurrets[client], Prop_Send, "m_vecMins", m_vecMins);
GetEntPropVector(g_iTurrets[client], Prop_Send, "m_vecMaxs", m_vecMaxs);
// MASK_SOLID
TR_TraceHullFilter(TurretPos, EnemyPos, m_vecMins, m_vecMaxs, MASK_SOLID, DontHitOwnerOrNade, client);
if(TR_GetEntityIndex() == i)
{

0 comments on commit 055b004

Please sign in to comment.