mirror of
https://github.com/Gigaslav/HL2Overcharged.git
synced 2026-01-04 02:10:18 +03:00
Init comit
This commit is contained in:
50
game/server/info_overlay_accessor.cpp
Normal file
50
game/server/info_overlay_accessor.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
// -------------------------------------------------------------------------------- //
|
||||
// An entity used to access overlays (and change their texture)
|
||||
// -------------------------------------------------------------------------------- //
|
||||
|
||||
class CInfoOverlayAccessor : public CPointEntity
|
||||
{
|
||||
public:
|
||||
|
||||
DECLARE_CLASS( CInfoOverlayAccessor, CPointEntity );
|
||||
|
||||
int UpdateTransmitState();
|
||||
|
||||
DECLARE_SERVERCLASS();
|
||||
DECLARE_DATADESC();
|
||||
|
||||
private:
|
||||
|
||||
CNetworkVar( int, m_iOverlayID );
|
||||
};
|
||||
|
||||
|
||||
// This table encodes the CBaseEntity data.
|
||||
IMPLEMENT_SERVERCLASS_ST_NOBASE(CInfoOverlayAccessor, DT_InfoOverlayAccessor)
|
||||
SendPropInt ( SENDINFO(m_iTextureFrameIndex), 8, SPROP_UNSIGNED ),
|
||||
SendPropInt ( SENDINFO(m_iOverlayID), 32, SPROP_UNSIGNED ),
|
||||
END_SEND_TABLE()
|
||||
|
||||
LINK_ENTITY_TO_CLASS( info_overlay_accessor, CInfoOverlayAccessor );
|
||||
|
||||
BEGIN_DATADESC( CInfoOverlayAccessor )
|
||||
DEFINE_KEYFIELD( m_iOverlayID, FIELD_INTEGER, "OverlayID" ),
|
||||
END_DATADESC()
|
||||
|
||||
|
||||
int CInfoOverlayAccessor::UpdateTransmitState()
|
||||
{
|
||||
return SetTransmitState( FL_EDICT_ALWAYS );
|
||||
}
|
||||
Reference in New Issue
Block a user