См. определение в файле 3_Game/Entities/EntityAI.c строка 1770
Перекрестные ссылки GetGame(), GetHierarchyRootPlayer() и CGame::GetPlayer().