diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/server/entityinput.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/server/entityinput.h')
| -rw-r--r-- | mp/src/game/server/entityinput.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/mp/src/game/server/entityinput.h b/mp/src/game/server/entityinput.h new file mode 100644 index 00000000..6668619d --- /dev/null +++ b/mp/src/game/server/entityinput.h @@ -0,0 +1,50 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+
+#ifndef INPUTVAR_H
+#define INPUTVAR_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "baseentity.h"
+#include "entitylist.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: Used to request a value, or a set of values, from a set of entities.
+// used when a multi-input variable needs to refresh it's inputs
+//-----------------------------------------------------------------------------
+class CMultiInputVar
+{
+public:
+ CMultiInputVar() : m_InputList(NULL) {}
+ ~CMultiInputVar();
+
+ struct inputitem_t
+ {
+ variant_t value; // local copy of variable (maybe make this a variant?)
+ int outputID; // the ID number of the output that sent this
+ inputitem_t *next;
+
+ // allocate and free from MPool memory
+ static void *operator new( size_t stAllocBlock );
+ static void *operator new( size_t stAllocateBlock, int nBlockUse, const char *pFileName, int nLine );
+ static void operator delete( void *pMem );
+ static void operator delete( void *pMem, int nBlockUse, const char *pFileName, int nLine ) { operator delete(pMem); }
+ };
+
+ inputitem_t *m_InputList; // list of data
+ int m_bUpdatedThisFrame;
+
+ void AddValue( variant_t newVal, int outputID );
+
+ DECLARE_SIMPLE_DATADESC();
+};
+
+#endif // INPUTVAR_H
|