save point for tomorrow, good night

This commit is contained in:
Dmitry 2015-06-11 00:18:49 +03:00
commit 02823791c0
5 changed files with 69 additions and 17 deletions

View file

@ -1347,4 +1347,26 @@ void BotManager::SendDeathMsgFix (void)
for (int i = 0; i < GetMaxClients (); i++)
SendPingDataOffsets (g_clients[i].ent);
}
}
void BotManager::UpdateActiveGrenades (void)
{
edict_t *grenade = NULL;
// clear previously stored grenades
m_activeGrenades.RemoveAll ();
// search the map for any type of grenade
while (!IsEntityNull (grenade = FIND_ENTITY_BY_CLASSNAME (grenade, "grenade")))
{
if (grenade->v.effects & EF_NODRAW)
continue;
m_activeGrenades.Push (grenade);
}
}
const Array <entity_t> BotManager::GetActiveGrenades (void)
{
return m_activeGrenades;
}