Add new work-in-progress entity structures to SDK

Thanks to rexx for the structures.
This commit is contained in:
Kawe Mazidjatari 2023-01-18 00:46:17 +01:00
parent 94bf515ba7
commit 217bbc8ea1
22 changed files with 915 additions and 5 deletions

View File

@ -74,7 +74,7 @@ class VServerGameDLL : public IDetour
}
virtual void GetVar(void) const
{
g_pGlobals = g_GameDll.FindPatternSIMD("4C 8B 0D ? ? ? ? 48 8B D1").ResolveRelativeAddressSelf(0x3, 0x7).RCast<CGlobalVars*>();
g_pGlobals = g_GameDll.FindPatternSIMD("4C 8B 0D ?? ?? ?? ?? 48 8B D1").ResolveRelativeAddressSelf(0x3, 0x7).RCast<CGlobalVars*>();
}
virtual void GetCon(void) const { }
virtual void Attach(void) const { }

View File

@ -0,0 +1,3 @@
#include "core/stdafx.h"
#include "public/baseentity.h"
#include "public/basehandle.h"

View File

@ -0,0 +1,25 @@
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef SERVERNETWORKPROPERTY_H
#define SERVERNETWORKPROPERTY_H
#ifdef _WIN32
#pragma once
#endif
#include "public/iservernetworkable.h"
#include "public/server_class.h"
struct CServerNetworkProperty : IServerNetworkable
{
CBaseEntity* m_pOuter;
ServerClass* m_pServerClass;
int m_edict;
int m_hParent;
};
#endif // SERVERNETWORKPROPERTY_H

View File

@ -0,0 +1 @@
#include "core/stdafx.h"

View File

@ -0,0 +1,40 @@
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef COLLISIONPROPERTY_H
#define COLLISIONPROPERTY_H
#include "public/engine/ICollideable.h"
#include "mathlib/vector.h"
class CCollisionProperty : public ICollideable
{
void* m_pOuter; // CBaseEntity?
Vector3D m_vecMins;
Vector3D m_vecMaxs;
int m_usSolidFlags;
char m_nSolidType;
char m_triggerBloat;
char m_collisionDetailLevel;
char m_isInDirtyList;
char m_hasDirtyBounds;
char m_hiddenFromSpatialQueries;
__int16 m_dirtyListIndex;
char m_nSurroundType;
char gap_35[1];
__int16 m_spatialAccelHandle;
__int16 m_partitionMask;
char gap_3a[2];
float m_flRadius;
Vector3D m_vecSpecifiedSurroundingMins;
Vector3D m_vecSpecifiedSurroundingMaxs;
Vector3D m_vecSurroundingMins;
Vector3D m_vecSurroundingMaxs;
float m_hitboxTestRadius;
};
#endif // COLLISIONPROPERTY_H

242
r5dev/public/baseentity.h Normal file
View File

@ -0,0 +1,242 @@
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef BASEENTITY_H
#define BASEENTITY_H
#ifdef _WIN32
#pragma once
#endif
#include "mathlib/vector.h"
#include "game/server/networkproperty.h"
#include "game/shared/collisionproperty.h"
#include "iservernetworkable.h"
#include "iserverentity.h"
class CBaseEntity : public IServerEntity
{
char m_RefEHandle[4];
char gap_c[4];
void* m_collideable;
void* m_networkable;
int genericKeyValueCount;
char gap_24[4];
void* genericKeyValues;
void* m_pfnMoveDone;
void* m_pfnThink;
CServerNetworkProperty m_Network;
__int64 m_ModelName;
int m_entIndex;
char gap_74[8];
__int64 m_iClassname;
float m_flAnimTime;
float m_flSimulationTime;
int m_creationTick;
int m_nLastThinkTick;
int m_PredictableID;
int touchStamp;
char m_aThinkFunctions[32];
float m_entitySpawnTime;
int m_spawner;
bool m_wantsDamageCallbacks;
bool m_wantsDeathCallbacks;
char gap_c2[2];
int m_nNextThinkTick;
int m_fEffects;
bool m_thinkNextFrame;
char gap_cd[3];
__int64 m_target;
int m_networkedFlags;
char m_nRenderFX;
char m_nRenderMode;
__int16 m_nModelIndex;
int m_clrRender;
char m_clIntensity;
char gap_e5[3];
int m_desiredHibernationType;
int m_scriptMinHibernationType;
int m_minSelfAndDescendantHibernationType;
int m_actualHibernationType;
int m_hibernationQueueIndex;
bool m_bRenderWithViewModels;
char gap_fd[3];
int m_nameVisibilityFlags;
float m_cloakEndTime;
float m_cloakFadeInEndTime;
float m_cloakFadeOutStartTime;
float m_cloakFadeInDuration;
float m_cloakFlickerAmount;
float m_cloakFlickerEndTime;
float m_cloakFadeOutDuration;
Vector3D m_highlightParams[16];
int m_highlightFunctionBits[8];
float m_highlightServerFadeBases[2];
float m_highlightServerFadeStartTimes[2];
float m_highlightServerFadeEndTimes[2];
int m_highlightServerContextID;
int m_highlightTeamBits;
float m_nextGrenadeTargetTime;
float m_grenadeTargetDebounce;
int m_nSimulationTick;
int m_fDataObjectTypes;
int m_iEFlags;
int m_fFlags;
__int64 m_iName;
int m_scriptNameIndex;
int m_instanceNameIndex;
char m_scriptName[64];
char m_instanceName[64];
__int64 m_holdUsePrompt;
__int64 m_pressUsePrompt;
float m_attachmentLerpStartTime;
float m_attachmentLerpEndTime;
Vector3D m_attachmentLerpStartOrigin;
Vector3D m_attachmentLerpStartAngles;
int m_parentAttachmentType;
int m_parentAttachmentIndex;
int m_parentAttachmentHitbox;
int m_parentAttachmentModel;
char m_MoveType;
char m_MoveCollide;
char gap_30a[2];
int m_RestoreMoveTypeOnDetach;
int m_hMoveParent;
int m_hMoveChild;
int m_hMovePeer;
bool m_bIsActiveChild;
bool m_bPrevAbsOriginValid;
char gap_31e[2];
int m_descendantZiplineCount;
char gap_324[4];
CCollisionProperty m_Collision;
int m_hOwnerEntity;
int m_CollisionGroup;
int m_contents;
bool m_collideWithOwner;
char gap_3ad[3];
int m_baseSolidType;
char gap_3b4[4];
char m_pPhysicsObject[8];
float m_flNavIgnoreUntilTime;
int m_hGroundEntity;
float m_flGroundChangeTime;
Vector3D m_vecBaseVelocity;
int m_baseVelocityEnt;
Vector3D m_vecAbsVelocity;
Vector3D m_vecAngVelocity;
char gap_3f4[12];
float m_rgflCoordinateFrame[12];
float m_flFriction;
float m_flLocalTime;
float m_flVPhysicsUpdateLocalTime;
float m_flMoveDoneTime;
int m_nPushEnumCount;
Vector3D m_vecPrevAbsOrigin;
Vector3D m_vecAbsOrigin;
Vector3D m_angAbsRotation;
Vector3D m_vecVelocity;
char gap_474[4];
__int64 m_iParent;
int m_iHammerID;
float m_flSpeed;
int m_iMaxHealth;
int m_iHealth;
void* m_pfnTouch;
bool m_bClientSideRagdoll;
char m_lifeState;
char gap_49a[2];
int m_scriptNetData;
int m_phaseShiftFlags;
char m_baseTakeDamage;
char gap_4a5[3];
int m_invulnerableToDamageCount;
char m_passDamageToParent;
char gap_4ad[3];
Vector3D m_deathVelocity;
float m_lastTitanFootstepDamageTime;
float m_flMaxspeed;
int m_visibilityFlags;
char m_OnUser1[40];
char m_OnDeath[40];
char m_OnDestroy[40];
int m_cellWidth;
int m_cellBits;
int m_cellX;
int m_cellY;
int m_cellZ;
Vector3D m_localOrigin;
Vector3D m_localAngles;
Vector3D m_vecViewOffset;
int m_ListByClass;
char gap_57c[4];
void* m_pPrevByClass;
void* m_pNextByClass;
int m_iInitialTeamNum;
int m_iTeamNum;
int m_teamMemberIndex;
int m_squadID;
int m_grade;
int m_ignorePredictedTriggerFlags;
int m_passThroughFlags;
int m_passThroughThickness;
float m_passThroughDirection;
int m_spawnflags;
float m_flGravity;
float m_entityFadeDist;
int m_dissolveEffectEntityHandle;
float m_fadeDist;
__int64 m_iSignifierName;
int m_collectedInvalidateFlags;
bool m_collectingInvalidateFlags;
char gap_5d5[3];
int m_lagCompensationCounter;
bool m_bLagCompensate;
bool m_bNetworkQuantizeOriginAndAngles;
bool m_bForcePurgeFixedupStrings;
char gap_5df[1];
int m_debugOverlays;
char gap_5e4[4];
void* m_pTimedOverlay;
char m_ScriptScope[32];
char m_hScriptInstance[8];
__int64 m_iszScriptId;
int m_bossPlayer;
int m_usableType;
int m_usablePriority;
float m_usableDistanceOverride;
float m_usableFOV;
float m_usePromptSize;
bool m_hasDispatchedSpawn;
bool m_bDoDestroyCallback;
bool m_bDoPusherCallback;
bool m_bDoPreSpawnCallback;
bool m_bDoOnSpawnedCallback;
char gap_63d[3];
float m_spottedBeginTimes[128];
float m_spottedLatestTimes[128];
__int64 m_spottedByTeams[4];
char m_minimapData[88];
int m_shieldHealth;
int m_shieldHealthMax;
int m_firstChildEntityLink;
int m_firstParentEntityLink;
bool m_bIsSoundCodeControllerValueSet;
char gap_ac9[3];
float m_flSoundCodeControllerValue;
float m_pusherWithChildrenRadius;
int m_childPusherMoveHandlerCount;
bool m_inWater;
char gap_ad9[7];
void* m_statusEffectPlugin;
__int64 m_realmsBitMask;
char m_realmsTransmitMaskCached[16];
int m_realmsTransmitMaskCachedSerialNumber;
};
#endif // BASEENTITY_H

217
r5dev/public/basehandle.h Normal file
View File

@ -0,0 +1,217 @@
//====== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose:
//
//=============================================================================//
#ifndef BASEHANDLE_H
#define BASEHANDLE_H
#ifdef _WIN32
#pragma once
#endif
#include "const.h"
#include "tier0/platform.h"
#include "tier0/dbg.h"
class IHandleEntity;
// -------------------------------------------------------------------------------------------------- //
// CBaseHandle.
// -------------------------------------------------------------------------------------------------- //
enum INVALID_EHANDLE_tag
{
INVALID_EHANDLE
};
class CBaseHandle
{
friend class CBaseEntityList;
public:
CBaseHandle();
CBaseHandle( INVALID_EHANDLE_tag );
CBaseHandle( const CBaseHandle &other );
explicit CBaseHandle( IHandleEntity* pHandleObj );
CBaseHandle( int iEntry, int iSerialNumber );
// NOTE: The following constructor is not type-safe, and can allow creating an
// arbitrary CBaseHandle that doesn't necessarily point to an actual object.
//
// It is your responsibility to ensure that the target of the handle actually points
// to the object you think it does. Generally, the argument to this function should
// have been obtained from CBaseHandle::ToInt() on a valid handle.
static CBaseHandle UnsafeFromIndex( int index );
void Init( int iEntry, int iSerialNumber );
void Term();
// Even if this returns true, Get() still can return return a non-null value.
// This just tells if the handle has been initted with any values.
bool IsValid() const;
int GetEntryIndex() const;
int GetSerialNumber() const;
int ToInt() const;
bool operator !=( const CBaseHandle &other ) const;
bool operator ==( const CBaseHandle &other ) const;
bool operator ==( const IHandleEntity* pEnt ) const;
bool operator !=( const IHandleEntity* pEnt ) const;
bool operator <( const CBaseHandle &other ) const;
bool operator <( const IHandleEntity* pEnt ) const;
// Assign a value to the handle.
const CBaseHandle& operator=( const IHandleEntity *pEntity );
const CBaseHandle& Set( const IHandleEntity *pEntity );
// Use this to dereference the handle.
// Note: this is implemented in game code (ehandle.h)
IHandleEntity* Get() const;
protected:
// The low NUM_SERIAL_BITS hold the index. If this value is less than MAX_EDICTS, then the entity is networkable.
// The high NUM_SERIAL_NUM_BITS bits are the serial number.
uint32_t m_Index;
};
#include "ihandleentity.h"
inline CBaseHandle::CBaseHandle()
{
m_Index = INVALID_EHANDLE_INDEX;
}
inline CBaseHandle::CBaseHandle( INVALID_EHANDLE_tag )
{
m_Index = INVALID_EHANDLE_INDEX;
}
inline CBaseHandle::CBaseHandle( const CBaseHandle &other )
{
m_Index = other.m_Index;
}
inline CBaseHandle::CBaseHandle( IHandleEntity* pEntity )
{
Set( pEntity );
}
inline CBaseHandle::CBaseHandle( int iEntry, int iSerialNumber )
{
Init( iEntry, iSerialNumber );
}
inline CBaseHandle CBaseHandle::UnsafeFromIndex( int index )
{
CBaseHandle ret;
ret.m_Index = index;
return ret;
}
inline void CBaseHandle::Init( int iEntry, int iSerialNumber )
{
Assert( iEntry >= 0 && (iEntry & ENT_ENTRY_MASK) == iEntry);
Assert( iSerialNumber >= 0 && iSerialNumber < (1 << NUM_SERIAL_NUM_BITS) );
m_Index = iEntry | (iSerialNumber << NUM_SERIAL_NUM_SHIFT_BITS);
}
inline void CBaseHandle::Term()
{
m_Index = INVALID_EHANDLE_INDEX;
}
inline bool CBaseHandle::IsValid() const
{
return m_Index != INVALID_EHANDLE_INDEX;
}
inline int CBaseHandle::GetEntryIndex() const
{
// There is a hack here: due to a bug in the original implementation of the
// entity handle system, an attempt to look up an invalid entity index in
// certain cirumstances might fall through to the the mask operation below.
// This would mask an invalid index to be in fact a lookup of entity number
// NUM_ENT_ENTRIES, so invalid ent indexes end up actually looking up the
// last slot in the entities array. Since this slot is always empty, the
// lookup returns NULL and the expected behavior occurs through this unexpected
// route.
// A lot of code actually depends on this behavior, and the bug was only exposed
// after a change to NUM_SERIAL_NUM_BITS increased the number of allowable
// static props in the world. So the if-stanza below detects this case and
// retains the prior (bug-submarining) behavior.
if ( !IsValid() )
return NUM_ENT_ENTRIES-1;
return m_Index & ENT_ENTRY_MASK;
}
inline int CBaseHandle::GetSerialNumber() const
{
return m_Index >> NUM_SERIAL_NUM_SHIFT_BITS;
}
inline int CBaseHandle::ToInt() const
{
return (int)m_Index;
}
inline bool CBaseHandle::operator !=( const CBaseHandle &other ) const
{
return m_Index != other.m_Index;
}
inline bool CBaseHandle::operator ==( const CBaseHandle &other ) const
{
return m_Index == other.m_Index;
}
inline bool CBaseHandle::operator ==( const IHandleEntity* pEnt ) const
{
return Get() == pEnt;
}
inline bool CBaseHandle::operator !=( const IHandleEntity* pEnt ) const
{
return Get() != pEnt;
}
inline bool CBaseHandle::operator <( const CBaseHandle &other ) const
{
return m_Index < other.m_Index;
}
//inline bool CBaseHandle::operator <( const IHandleEntity *pEntity ) const
//{
// uint32 otherIndex = (pEntity) ? pEntity->GetRefEHandle().m_Index : INVALID_EHANDLE_INDEX;
// return m_Index < otherIndex;
//}
inline const CBaseHandle& CBaseHandle::operator=( const IHandleEntity *pEntity )
{
return Set( pEntity );
}
//inline const CBaseHandle& CBaseHandle::Set( const IHandleEntity *pEntity )
//{
// if ( pEntity )
// {
// *this = pEntity->GetRefEHandle();
// }
// else
// {
// m_Index = INVALID_EHANDLE_INDEX;
// }
//
// return *this;
//}
#endif // BASEHANDLE_H

View File

@ -12,6 +12,14 @@
#define MAX_EDICT_BITS 14 // # of bits needed to represent max edicts
// Max # of edicts in a level
#define MAX_EDICTS (1<<MAX_EDICT_BITS)
// Used for networking ehandles.
#define NUM_ENT_ENTRY_BITS (MAX_EDICT_BITS + 2)
#define NUM_ENT_ENTRIES (1 << NUM_ENT_ENTRY_BITS)
#define INVALID_EHANDLE_INDEX 0xFFFFFFFF
#define NUM_SERIAL_NUM_BITS 16 // (32 - NUM_ENT_ENTRY_BITS)
#define NUM_SERIAL_NUM_SHIFT_BITS (32 - NUM_SERIAL_NUM_BITS)
#define ENT_ENTRY_MASK (( 1 << NUM_SERIAL_NUM_BITS) - 1)
enum RenderMode_t
{

View File

@ -0,0 +1,28 @@
//====== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef ENGINE_ICOLLIDEABLE_H
#define ENGINE_ICOLLIDEABLE_H
#ifdef _WIN32
#pragma once
#endif
#include "tier0/platform.h"
class IHandleEntity;
abstract_class ICollideable
{
public:
// Gets at the entity handle associated with the collideable
virtual IHandleEntity* GetEntityHandle() {};// = 0;
// TODO!!!
};
#endif // ENGINE_ICOLLIDEABLE_H

View File

@ -1,9 +1,8 @@
#pragma once
#include "basehandle.h"
#include "iclientnetworkable.h"
#include "icliententity.h"
using CBaseHandle = unsigned long;
class IClientEntityList // Fully reversed beside index 0 which is probably a destructor.
{
public:

View File

@ -1,9 +1,12 @@
#ifndef IHANDLEENTITY_H
#define IHANDLEENTITY_H
#include "basehandle.h"
class IHandleEntity
{
void* __vftable /*VFT*/;
public:
virtual void SetRefEHandle(const CBaseHandle& handle) = 0;
virtual ~IHandleEntity() {}
};
#endif // IHANDLEENTITY_H

View File

@ -0,0 +1,35 @@
//====== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef ISERVERENTITY_H
#define ISERVERENTITY_H
#ifdef _WIN32
#pragma once
#endif
#include "iserverunknown.h"
#include "string_t.h"
struct Ray_t;
class ServerClass;
class ICollideable;
class IServerNetworkable;
class Vector;
class QAngle;
// This class is how the engine talks to entities in the game DLL.
// CBaseEntity implements this interface.
class IServerEntity : public IServerUnknown
{
public:
};
#endif // ISERVERENTITY_H

View File

@ -0,0 +1,33 @@
//===== Copyright (c) 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef ISERVERNETWORKABLE_H
#define ISERVERNETWORKABLE_H
//-----------------------------------------------------------------------------
// Forward declarations
//-----------------------------------------------------------------------------
class CBaseEntity;
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
class IServerNetworkable
{
// These functions are handled automatically by the server_class macros and CBaseNetworkable.
public:
virtual CBaseEntity* GetBaseEntity() {}; // Only used by game code.
virtual const char* GetClassName() const {};
protected:
// Should never call delete on this!
virtual ~IServerNetworkable() {}
virtual void* Unk() {};
};
#endif // ISERVERNETWORKABLE_H

View File

@ -0,0 +1,35 @@
//====== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef ISERVERUNKNOWN_H
#define ISERVERUNKNOWN_H
#ifdef _WIN32
#pragma once
#endif
#include "ihandleentity.h"
//-------------------------------------------------------------------------------------
// Forward declarations
//-------------------------------------------------------------------------------------
class ICollideable;
class IServerNetworkable;
class CBaseEntity;
// This is the server's version of IUnknown. We may want to use a QueryInterface-like
// mechanism if this gets big.
class IServerUnknown : public IHandleEntity
{
public:
virtual CBaseEntity* GetBaseEntity() = 0;
};
#endif // ISERVERUNKNOWN_H

View File

@ -20,4 +20,16 @@ public:
int m_Unknown1;
int m_ClassID;
int m_InstanceBaselineIndex;
};
};
// If you do a DECLARE_SERVERCLASS, you need to do this inside the class definition.
#define DECLARE_SERVERCLASS() \
public: \
virtual ServerClass* GetServerClass(); \
static SendTable *m_pClassSendTable; \
template <typename T> friend int ServerClassInit(T *); \
virtual int YouForgotToImplementOrDeclareServerClass(); \
#define DECLARE_SERVERCLASS_NOBASE() \
public: \
template <typename T> friend int ServerClassInit(T *); \

116
r5dev/public/string_t.h Normal file
View File

@ -0,0 +1,116 @@
//====== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose: Defines the more complete set of operations on the string_t defined
// These should be used instead of direct manipulation to allow more
// flexibility in future ports or optimization.
//
// $NoKeywords: $
//=============================================================================//
#ifndef STRING_T_H
#define STRING_T_H
#if defined( _WIN32 )
#pragma once
#endif
#ifndef NO_STRING_T
#ifdef WEAK_STRING_T
typedef int string_t;
//-----------------------------------------------------------------------------
// Purpose: The correct way to specify the NULL string as a constant.
//-----------------------------------------------------------------------------
#define NULL_STRING 0
//-----------------------------------------------------------------------------
// Purpose: Given a string_t, make a C string. By convention the result string
// pointer should be considered transient and should not be stored.
//-----------------------------------------------------------------------------
#define STRING( offset ) ( ( offset ) ? reinterpret_cast<const char *>( offset ) : "" )
//-----------------------------------------------------------------------------
// Purpose: Given a C string, obtain a string_t
//-----------------------------------------------------------------------------
#define MAKE_STRING( str ) ( ( *str != 0 ) ? reinterpret_cast<int>( str ) : 0 )
//-----------------------------------------------------------------------------
#define IDENT_STRINGS( s1, s2 ) ( *((void **)&(s1)) == *((void **)&(s2)) )
//-----------------------------------------------------------------------------
#else // Strong string_t
//-----------------------------------------------------------------------------
struct string_t
{
public:
bool operator!() const { return ( pszValue == nullptr ); }
bool operator==( const string_t &rhs ) const { return ( pszValue == rhs.pszValue ); }
bool operator!=( const string_t &rhs ) const { return ( pszValue != rhs.pszValue ); }
bool operator<( const string_t &rhs ) const { return ((void *)pszValue < (void *)rhs.pszValue ); }
const char *ToCStr() const { return ( pszValue ) ? pszValue : ""; }
protected:
const char *pszValue;
};
//-----------------------------------------------------------------------------
struct castable_string_t : public string_t // string_t is used in unions, hence, no constructor allowed
{
castable_string_t() { pszValue = nullptr; }
castable_string_t( const char *pszFrom ) { pszValue = (pszFrom && *pszFrom) ? pszFrom : 0; }
};
//-----------------------------------------------------------------------------
// Purpose: The correct way to specify the NULL string as a constant.
//-----------------------------------------------------------------------------
#define NULL_STRING castable_string_t()
//-----------------------------------------------------------------------------
// Purpose: Given a string_t, make a C string. By convention the result string
// pointer should be considered transient and should not be stored.
//-----------------------------------------------------------------------------
#define STRING( string_t_obj ) (string_t_obj).ToCStr()
//-----------------------------------------------------------------------------
// Purpose: Given a C string, obtain a string_t
//-----------------------------------------------------------------------------
#define MAKE_STRING( c_str ) castable_string_t( c_str )
//-----------------------------------------------------------------------------
#define IDENT_STRINGS( s1, s2 ) ( *((void **)&(s1)) == *((void **)&(s2)) )
//-----------------------------------------------------------------------------
#endif
#else // NO_STRING_T
typedef const char *string_t;
#define NULL_STRING 0
#define STRING( c_str ) ( c_str )
#define MAKE_STRING( c_str ) ( c_str )
#define IDENT_STRINGS( s1, s2 ) ( *((void **)&(s1)) == *((void **)&(s2)) )
#endif // NO_STRING_T
// Zero the object -- necessary for CNetworkVar and possibly other cases.
inline void EnsureValidValue( string_t &x ) { x = NULL_STRING; }
//=============================================================================
#endif // STRING_T_H

View File

@ -63,6 +63,7 @@
<ClCompile Include="..\game\client\spritemodel.cpp" />
<ClCompile Include="..\game\client\viewrender.cpp" />
<ClCompile Include="..\game\shared\animation.cpp" />
<ClCompile Include="..\game\shared\collisionproperty.cpp" />
<ClCompile Include="..\inputsystem\inputsystem.cpp" />
<ClCompile Include="..\launcher\IApplication.cpp" />
<ClCompile Include="..\launcher\launcher.cpp" />
@ -231,6 +232,7 @@
<ClInclude Include="..\game\client\hud.h" />
<ClInclude Include="..\game\client\viewrender.h" />
<ClInclude Include="..\game\shared\animation.h" />
<ClInclude Include="..\game\shared\collisionproperty.h" />
<ClInclude Include="..\inputsystem\ButtonCode.h" />
<ClInclude Include="..\inputsystem\inputsystem.h" />
<ClInclude Include="..\launcher\IApplication.h" />
@ -270,11 +272,13 @@
<ClInclude Include="..\protoc\sv_rcon.pb.h" />
<ClInclude Include="..\public\avi\iavi.h" />
<ClInclude Include="..\public\avi\ibik.h" />
<ClInclude Include="..\public\basehandle.h" />
<ClInclude Include="..\public\bitmap\stb_image.h" />
<ClInclude Include="..\public\datamap.h" />
<ClInclude Include="..\public\dt_common.h" />
<ClInclude Include="..\public\dt_recv.h" />
<ClInclude Include="..\public\eiface.h" />
<ClInclude Include="..\public\engine\ICollideable.h" />
<ClInclude Include="..\public\iengine.h" />
<ClInclude Include="..\public\client_class.h" />
<ClInclude Include="..\public\const.h" />

View File

@ -238,6 +238,9 @@
<Filter Include="sdk\codecs\miles">
<UniqueIdentifier>{5529291a-e3b6-44a7-8edf-f0fe4e0ac4dc}</UniqueIdentifier>
</Filter>
<Filter Include="sdk\public\engine">
<UniqueIdentifier>{c785a075-5583-4bb4-bdac-5f7419ee64ab}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\client\cdll_engine_int.cpp">
@ -651,6 +654,9 @@
<ClCompile Include="..\public\utility\crashhandler.cpp">
<Filter>sdk\public\utility</Filter>
</ClCompile>
<ClCompile Include="..\game\shared\collisionproperty.cpp">
<Filter>sdk\game\shared</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\client\cdll_engine_int.h">
@ -1889,6 +1895,15 @@
<ClInclude Include="..\public\eiface.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\engine\ICollideable.h">
<Filter>sdk\public\engine</Filter>
</ClInclude>
<ClInclude Include="..\public\basehandle.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\game\shared\collisionproperty.h">
<Filter>sdk\game\shared</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="..\shared\resource\lockedserver.png">

View File

@ -182,7 +182,9 @@
<ClInclude Include="..\game\server\detour_impl.h" />
<ClInclude Include="..\game\server\fairfight_impl.h" />
<ClInclude Include="..\game\server\gameinterface.h" />
<ClInclude Include="..\game\server\networkproperty.h" />
<ClInclude Include="..\game\shared\animation.h" />
<ClInclude Include="..\game\shared\collisionproperty.h" />
<ClInclude Include="..\launcher\IApplication.h" />
<ClInclude Include="..\launcher\launcher.h" />
<ClInclude Include="..\launcher\prx.h" />
@ -218,10 +220,13 @@
<ClInclude Include="..\protoc\cl_rcon.pb.h" />
<ClInclude Include="..\protoc\sig_map.pb.h" />
<ClInclude Include="..\protoc\sv_rcon.pb.h" />
<ClInclude Include="..\public\baseentity.h" />
<ClInclude Include="..\public\basehandle.h" />
<ClInclude Include="..\public\datamap.h" />
<ClInclude Include="..\public\dt_common.h" />
<ClInclude Include="..\public\dt_send.h" />
<ClInclude Include="..\public\eiface.h" />
<ClInclude Include="..\public\engine\ICollideable.h" />
<ClInclude Include="..\public\iengine.h" />
<ClInclude Include="..\public\client_class.h" />
<ClInclude Include="..\public\const.h" />
@ -239,11 +244,15 @@
<ClInclude Include="..\public\inetmsghandler.h" />
<ClInclude Include="..\public\ipackedstore.h" />
<ClInclude Include="..\public\iserver.h" />
<ClInclude Include="..\public\iserverentity.h" />
<ClInclude Include="..\public\iservernetworkable.h" />
<ClInclude Include="..\public\iserverunknown.h" />
<ClInclude Include="..\public\isnapshotmgr.h" />
<ClInclude Include="..\public\ivscript.h" />
<ClInclude Include="..\public\model_types.h" />
<ClInclude Include="..\public\networkvar.h" />
<ClInclude Include="..\public\server_class.h" />
<ClInclude Include="..\public\string_t.h" />
<ClInclude Include="..\public\studio.h" />
<ClInclude Include="..\public\utility\binstream.h" />
<ClInclude Include="..\public\utility\crashhandler.h" />
@ -529,7 +538,9 @@
<ClCompile Include="..\game\server\ai_networkmanager.cpp" />
<ClCompile Include="..\game\server\ai_utility.cpp" />
<ClCompile Include="..\game\server\gameinterface.cpp" />
<ClCompile Include="..\game\server\networkproperty.cpp" />
<ClCompile Include="..\game\shared\animation.cpp" />
<ClCompile Include="..\game\shared\collisionproperty.cpp" />
<ClCompile Include="..\launcher\IApplication.cpp" />
<ClCompile Include="..\launcher\launcher.cpp" />
<ClCompile Include="..\launcher\prx.cpp" />

View File

@ -196,6 +196,9 @@
<Filter Include="sdk\pluginsystem">
<UniqueIdentifier>{d0650f0e-6359-4322-82c2-97f2e40f141f}</UniqueIdentifier>
</Filter>
<Filter Include="sdk\public\engine">
<UniqueIdentifier>{3760be6a-7ccb-4ad7-bba8-608dcc60a6b5}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common\opcodes.h">
@ -1293,6 +1296,33 @@
<ClInclude Include="..\public\eiface.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\basehandle.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\iserverentity.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\iservernetworkable.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\iserverunknown.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\string_t.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\baseentity.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\engine\ICollideable.h">
<Filter>sdk\public\engine</Filter>
</ClInclude>
<ClInclude Include="..\game\shared\collisionproperty.h">
<Filter>sdk\game\shared</Filter>
</ClInclude>
<ClInclude Include="..\game\server\networkproperty.h">
<Filter>sdk\game\server</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\common\opcodes.cpp">
@ -1634,6 +1664,12 @@
<ClCompile Include="..\public\utility\crashhandler.cpp">
<Filter>sdk\public\utility</Filter>
</ClCompile>
<ClCompile Include="..\game\shared\collisionproperty.cpp">
<Filter>sdk\game\shared</Filter>
</ClCompile>
<ClCompile Include="..\game\server\networkproperty.cpp">
<Filter>sdk\game\server</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\Dedicated.def" />

View File

@ -69,8 +69,10 @@
<ClCompile Include="..\game\server\ai_networkmanager.cpp" />
<ClCompile Include="..\game\server\ai_utility.cpp" />
<ClCompile Include="..\game\server\gameinterface.cpp" />
<ClCompile Include="..\game\server\networkproperty.cpp" />
<ClCompile Include="..\game\shared\ai_utility_shared.cpp" />
<ClCompile Include="..\game\shared\animation.cpp" />
<ClCompile Include="..\game\shared\collisionproperty.cpp" />
<ClCompile Include="..\inputsystem\inputsystem.cpp" />
<ClCompile Include="..\launcher\IApplication.cpp" />
<ClCompile Include="..\launcher\launcher.cpp" />
@ -252,8 +254,10 @@
<ClInclude Include="..\game\server\detour_impl.h" />
<ClInclude Include="..\game\server\fairfight_impl.h" />
<ClInclude Include="..\game\server\gameinterface.h" />
<ClInclude Include="..\game\server\networkproperty.h" />
<ClInclude Include="..\game\shared\ai_utility_shared.h" />
<ClInclude Include="..\game\shared\animation.h" />
<ClInclude Include="..\game\shared\collisionproperty.h" />
<ClInclude Include="..\inputsystem\ButtonCode.h" />
<ClInclude Include="..\inputsystem\inputsystem.h" />
<ClInclude Include="..\launcher\IApplication.h" />
@ -297,12 +301,15 @@
<ClInclude Include="..\protoc\sv_rcon.pb.h" />
<ClInclude Include="..\public\avi\iavi.h" />
<ClInclude Include="..\public\avi\ibik.h" />
<ClInclude Include="..\public\baseentity.h" />
<ClInclude Include="..\public\basehandle.h" />
<ClInclude Include="..\public\bitmap\stb_image.h" />
<ClInclude Include="..\public\datamap.h" />
<ClInclude Include="..\public\dt_common.h" />
<ClInclude Include="..\public\dt_recv.h" />
<ClInclude Include="..\public\dt_send.h" />
<ClInclude Include="..\public\eiface.h" />
<ClInclude Include="..\public\engine\ICollideable.h" />
<ClInclude Include="..\public\iengine.h" />
<ClInclude Include="..\public\client_class.h" />
<ClInclude Include="..\public\const.h" />
@ -332,6 +339,9 @@
<ClInclude Include="..\public\inetmsghandler.h" />
<ClInclude Include="..\public\ipackedstore.h" />
<ClInclude Include="..\public\iserver.h" />
<ClInclude Include="..\public\iserverentity.h" />
<ClInclude Include="..\public\iservernetworkable.h" />
<ClInclude Include="..\public\iserverunknown.h" />
<ClInclude Include="..\public\isnapshotmgr.h" />
<ClInclude Include="..\public\isurfacesystem.h" />
<ClInclude Include="..\public\ivrenderview.h" />
@ -341,6 +351,7 @@
<ClInclude Include="..\public\networkvar.h" />
<ClInclude Include="..\public\rendersystem\schema\texture.g.h" />
<ClInclude Include="..\public\server_class.h" />
<ClInclude Include="..\public\string_t.h" />
<ClInclude Include="..\public\studio.h" />
<ClInclude Include="..\core\resource.h" />
<ClInclude Include="..\public\utility\binstream.h" />

View File

@ -247,6 +247,9 @@
<Filter Include="sdk\codecs\miles">
<UniqueIdentifier>{f53df686-70b6-4883-a966-1eb3fd7eb2b1}</UniqueIdentifier>
</Filter>
<Filter Include="sdk\public\engine">
<UniqueIdentifier>{027d27a1-089a-4ea1-b764-1b436c6d20a2}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\client\vengineclient_impl.cpp">
@ -693,6 +696,12 @@
<ClCompile Include="..\public\utility\crashhandler.cpp">
<Filter>sdk\public\utility</Filter>
</ClCompile>
<ClCompile Include="..\game\server\networkproperty.cpp">
<Filter>sdk\game\server</Filter>
</ClCompile>
<ClCompile Include="..\game\shared\collisionproperty.cpp">
<Filter>sdk\game\shared</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\client\cdll_engine_int.h">
@ -1991,6 +2000,33 @@
<ClInclude Include="..\public\eiface.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\iservernetworkable.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\iserverunknown.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\iserverentity.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\string_t.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\public\baseentity.h">
<Filter>sdk\public</Filter>
</ClInclude>
<ClInclude Include="..\game\server\networkproperty.h">
<Filter>sdk\game\server</Filter>
</ClInclude>
<ClInclude Include="..\game\shared\collisionproperty.h">
<Filter>sdk\game\shared</Filter>
</ClInclude>
<ClInclude Include="..\public\engine\ICollideable.h">
<Filter>sdk\public\engine</Filter>
</ClInclude>
<ClInclude Include="..\public\basehandle.h">
<Filter>sdk\public</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="..\shared\resource\lockedserver.png">