Cleanup bot code (server related)

This commit is contained in:
aurhat
2015-06-21 10:36:08 +02:00
parent 9613098697
commit dc1b920820
5 changed files with 17 additions and 52 deletions
+4 -13
View File
@@ -208,11 +208,11 @@ void TraceLine(vec from, vec to, dynent *pTracer, bool CheckPlayers, traceresult
if (CheckPlayers)
{
// Check if the 'line' collides with players
loopv(players)
// Check if the 'line' collides with bots
loopv(bots)
{
playerent *d = players[i];
if(!d || (d==pTracer) || (d->state != CS_ALIVE)) continue; // Only check valid players
playerent *d = bots[i];
if(!d || (d==pTracer) || (d->state != CS_ALIVE)) continue; // Only check valid bots
flDist = GetDistance(from, d->o);
@@ -476,15 +476,6 @@ bool IsInGame(dynent *d)
{
if (d == player1)
return true;
else
{
loopv(players)
{
if (!players[i]) continue;
if (players[i] == d)
return true;
}
}
}
return false;
}