css_enhanced_waf/game/client/css_enhanced/c_entityinput.h
Kamay Xutax 14717d8092 Added prediction for triggers, thanks oblivious
Prediction is fixed by me by adding two more functions in prediction
class, there had before some issues because
starttouch/endtouch weren't predicted.
The result is that with lag, it restores touched entities,
including the triggers touched entity list.
2024-08-23 00:42:58 +02:00

45 lines
No EOL
1.3 KiB
C++

#ifndef C_ENTITYINPUT_H
#define C_ENTITYINPUT_H
#ifdef WIN32
#pragma once
#endif
#include "cbase.h"
#include "c_entityoutput.h"
#include "c_entitylistpool.h"
class variant_t;
//-----------------------------------------------------------------------------
// 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 C_MultiInputVar
{
public:
C_MultiInputVar() : m_InputList(NULL) {}
~C_MultiInputVar();
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