This repository has been archived on 2024-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
nekohook/modules/source2013/sdk/game/client/playerandobjectenumerator.h
2020-08-04 13:13:01 -04:00

45 lines
1.0 KiB
C++

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef PLAYERANDOBJECTENUMERATOR_H
#define PLAYERANDOBJECTENUMERATOR_H
#ifdef _WIN32
#pragma once
#endif
#include "ehandle.h"
#include "ispatialpartition.h"
#include "utlvector.h"
class C_BaseEntity;
class C_BasePlayer;
// Enumator class for finding other players and objects close to the
// local player
class CPlayerAndObjectEnumerator : public IPartitionEnumerator {
DECLARE_CLASS_NOBASE(CPlayerAndObjectEnumerator);
public:
// Forced constructor
CPlayerAndObjectEnumerator(float radius);
// Actual work code
virtual IterationRetval_t EnumElement(IHandleEntity *pHandleEntity);
int GetObjectCount();
C_BaseEntity *GetObject(int index);
public:
// Data members
float m_flRadiusSquared;
CUtlVector<CHandle<C_BaseEntity> > m_Objects;
C_BasePlayer *m_pLocal;
};
#endif // PLAYERANDOBJECTENUMERATOR_H