mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
Added most recent version of unmodified HL2 SDK for Episode 1 engine
This commit is contained in:
44
cl_dll/playerandobjectenumerator.h
Normal file
44
cl_dll/playerandobjectenumerator.h
Normal file
@ -0,0 +1,44 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef PLAYERANDOBJECTENUMERATOR_H
|
||||
#define PLAYERANDOBJECTENUMERATOR_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "UtlVector.h"
|
||||
#include "ehandle.h"
|
||||
#include "ISpatialPartition.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
|
Reference in New Issue
Block a user