aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/eventqueue.h
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/server/eventqueue.h
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/server/eventqueue.h')
-rw-r--r--mp/src/game/server/eventqueue.h166
1 files changed, 83 insertions, 83 deletions
diff --git a/mp/src/game/server/eventqueue.h b/mp/src/game/server/eventqueue.h
index c7e6b992..1c7f030e 100644
--- a/mp/src/game/server/eventqueue.h
+++ b/mp/src/game/server/eventqueue.h
@@ -1,83 +1,83 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: A global class that holds a prioritized queue of entity I/O events.
-// Events can be posted with a nonzero delay, which determines how long
-// they are held before being dispatched to their recipients.
-//
-// The queue is serviced once per server frame.
-//
-//=============================================================================//
-
-#ifndef EVENTQUEUE_H
-#define EVENTQUEUE_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "mempool.h"
-
-struct EventQueuePrioritizedEvent_t
-{
- float m_flFireTime;
- string_t m_iTarget;
- string_t m_iTargetInput;
- EHANDLE m_pActivator;
- EHANDLE m_pCaller;
- int m_iOutputID;
- EHANDLE m_pEntTarget; // a pointer to the entity to target; overrides m_iTarget
-
- variant_t m_VariantValue; // variable-type parameter
-
- EventQueuePrioritizedEvent_t *m_pNext;
- EventQueuePrioritizedEvent_t *m_pPrev;
-
- DECLARE_SIMPLE_DATADESC();
-
- DECLARE_FIXEDSIZE_ALLOCATOR( PrioritizedEvent_t );
-};
-
-class CEventQueue
-{
-public:
- // pushes an event into the queue, targeting a string name (m_iName), or directly by a pointer
- void AddEvent( const char *target, const char *action, variant_t Value, float fireDelay, CBaseEntity *pActivator, CBaseEntity *pCaller, int outputID = 0 );
- void AddEvent( CBaseEntity *target, const char *action, float fireDelay, CBaseEntity *pActivator, CBaseEntity *pCaller, int outputID = 0 );
- void AddEvent( CBaseEntity *target, const char *action, variant_t Value, float fireDelay, CBaseEntity *pActivator, CBaseEntity *pCaller, int outputID = 0 );
-
- void CancelEvents( CBaseEntity *pCaller );
- void CancelEventOn( CBaseEntity *pTarget, const char *sInputName );
- bool HasEventPending( CBaseEntity *pTarget, const char *sInputName );
-
- // services the queue, firing off any events who's time hath come
- void ServiceEvents( void );
-
- // debugging
- void ValidateQueue( void );
-
- // serialization
- int Save( ISave &save );
- int Restore( IRestore &restore );
-
- CEventQueue();
- ~CEventQueue();
-
- void Init( void );
- void Clear( void ); // resets the list
-
- void Dump( void );
-
-private:
-
- void AddEvent( EventQueuePrioritizedEvent_t *event );
- void RemoveEvent( EventQueuePrioritizedEvent_t *pe );
-
- DECLARE_SIMPLE_DATADESC();
- EventQueuePrioritizedEvent_t m_Events;
- int m_iListCount;
-};
-
-extern CEventQueue g_EventQueue;
-
-
-#endif // EVENTQUEUE_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: A global class that holds a prioritized queue of entity I/O events.
+// Events can be posted with a nonzero delay, which determines how long
+// they are held before being dispatched to their recipients.
+//
+// The queue is serviced once per server frame.
+//
+//=============================================================================//
+
+#ifndef EVENTQUEUE_H
+#define EVENTQUEUE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "mempool.h"
+
+struct EventQueuePrioritizedEvent_t
+{
+ float m_flFireTime;
+ string_t m_iTarget;
+ string_t m_iTargetInput;
+ EHANDLE m_pActivator;
+ EHANDLE m_pCaller;
+ int m_iOutputID;
+ EHANDLE m_pEntTarget; // a pointer to the entity to target; overrides m_iTarget
+
+ variant_t m_VariantValue; // variable-type parameter
+
+ EventQueuePrioritizedEvent_t *m_pNext;
+ EventQueuePrioritizedEvent_t *m_pPrev;
+
+ DECLARE_SIMPLE_DATADESC();
+
+ DECLARE_FIXEDSIZE_ALLOCATOR( PrioritizedEvent_t );
+};
+
+class CEventQueue
+{
+public:
+ // pushes an event into the queue, targeting a string name (m_iName), or directly by a pointer
+ void AddEvent( const char *target, const char *action, variant_t Value, float fireDelay, CBaseEntity *pActivator, CBaseEntity *pCaller, int outputID = 0 );
+ void AddEvent( CBaseEntity *target, const char *action, float fireDelay, CBaseEntity *pActivator, CBaseEntity *pCaller, int outputID = 0 );
+ void AddEvent( CBaseEntity *target, const char *action, variant_t Value, float fireDelay, CBaseEntity *pActivator, CBaseEntity *pCaller, int outputID = 0 );
+
+ void CancelEvents( CBaseEntity *pCaller );
+ void CancelEventOn( CBaseEntity *pTarget, const char *sInputName );
+ bool HasEventPending( CBaseEntity *pTarget, const char *sInputName );
+
+ // services the queue, firing off any events who's time hath come
+ void ServiceEvents( void );
+
+ // debugging
+ void ValidateQueue( void );
+
+ // serialization
+ int Save( ISave &save );
+ int Restore( IRestore &restore );
+
+ CEventQueue();
+ ~CEventQueue();
+
+ void Init( void );
+ void Clear( void ); // resets the list
+
+ void Dump( void );
+
+private:
+
+ void AddEvent( EventQueuePrioritizedEvent_t *event );
+ void RemoveEvent( EventQueuePrioritizedEvent_t *pe );
+
+ DECLARE_SIMPLE_DATADESC();
+ EventQueuePrioritizedEvent_t m_Events;
+ int m_iListCount;
+};
+
+extern CEventQueue g_EventQueue;
+
+
+#endif // EVENTQUEUE_H
+