Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions sp/src/game/server/entityoutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@ class CBaseEntityOutput
void SetActionList(CEventAction *newlist) { m_ActionList = newlist; }
#endif

#ifdef MAPBASE_VSCRIPT
// Value is accessed in CScriptNetPropManager
public:
#else
protected:
#endif
variant_t m_Value;
#ifdef MAPBASE_VSCRIPT
protected:
#endif
CEventAction *m_ActionList;
DECLARE_SIMPLE_DATADESC();

Expand All @@ -104,6 +112,14 @@ template< class Type, fieldtype_t fieldType >
class CEntityOutputTemplate : public CBaseEntityOutput
{
public:
#ifdef MAPBASE_VSCRIPT
// Initialise type to allow script access
CEntityOutputTemplate() : CBaseEntityOutput()
{
m_Value.fieldType = fieldType;
}
#endif

//
// Sets an initial value without firing the output.
//
Expand Down Expand Up @@ -138,6 +154,13 @@ template<>
class CEntityOutputTemplate<class Vector, FIELD_VECTOR> : public CBaseEntityOutput
{
public:
#ifdef MAPBASE_VSCRIPT
CEntityOutputTemplate() : CBaseEntityOutput()
{
m_Value.fieldType = FIELD_VECTOR;
}
#endif

void Init( const Vector &value )
{
m_Value.SetVector3D( value );
Expand Down Expand Up @@ -183,6 +206,13 @@ template<>
class CEntityOutputTemplate<class Vector, FIELD_POSITION_VECTOR> : public CBaseEntityOutput
{
public:
#ifdef MAPBASE_VSCRIPT
CEntityOutputTemplate() : CBaseEntityOutput()
{
m_Value.fieldType = FIELD_POSITION_VECTOR;
}
#endif

void Init( const Vector &value )
{
m_Value.SetPositionVector3D( value );
Expand Down
5 changes: 5 additions & 0 deletions sp/src/game/server/variant_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ struct ScriptVariant_t;
//
class variant_t
{
#ifdef MAPBASE_VSCRIPT
// Offsets are read in CScriptNetPropManager
public:
#endif

union
{
bool bVal;
Expand Down
Loading
Loading