diff --git a/include/cstrike/Classes/CBaseHandle.h b/include/cstrike/Classes/CBaseHandle.h new file mode 100644 index 0000000..58f3bee --- /dev/null +++ b/include/cstrike/Classes/CBaseHandle.h @@ -0,0 +1,14 @@ +#pragma once + +class CBaseHandle { + public: + inline bool IsValid() const { + return m_Index != INVALID_EHANDLE_INDEX; + } + + inline int GetEntryIndex() const { + return m_Index & ENT_ENTRY_MASK; + } + + unsigned long m_Index; +}; \ No newline at end of file diff --git a/include/cstrike/Classes/IClientEntity.h b/include/cstrike/Classes/IClientEntity.h new file mode 100644 index 0000000..970572c --- /dev/null +++ b/include/cstrike/Classes/IClientEntity.h @@ -0,0 +1,8 @@ +#pragma once + +class IClientEntity: public IClientUnknown, public IClientRenderable, public IClientNetworkable, public IClientThinkable { + public: + virtual void Release(void) = 0; + virtual const Vector& GetAbsOrigin(void) const = 0; + virtual const QAngle& GetAbsAngles(void) const = 0; +}; \ No newline at end of file diff --git a/include/cstrike/Classes/IClientNetworkable.h b/include/cstrike/Classes/IClientNetworkable.h new file mode 100644 index 0000000..a825f1c --- /dev/null +++ b/include/cstrike/Classes/IClientNetworkable.h @@ -0,0 +1,25 @@ +#pragma once + +enum ShouldTransmitState_t: int { + SHOULDTRANSMIT_START = 0, + SHOULDTRANSMIT_END +}; + +enum DataUpdateType_t: int { + DATA_UPDATE_CREATED = 0, + DATA_UPDATE_DATATABLE_CHANGED +}; + +class IClientNetworkable { + public: + virtual IClientUnknown* GetIClientUnknown() = 0; + virtual void Release() = 0; + virtual ClientClass* GetClientClass() = 0; + virtual void NotifyShouldTransmit(ShouldTransmitState_t state) = 0; + virtual void OnPreDataChanged(DataUpdateType_t type) = 0; + virtual void OnDataChanged(DataUpdateType_t type) = 0; + virtual void PreDataUpdate(DataUpdateType_t type) = 0; + virtual void PostDataUpdate(DataUpdateType_t type) = 0; + virtual bool IsDormant(void) = 0; + virtual int GetIndex(void) const = 0; +}; \ No newline at end of file diff --git a/include/cstrike/Classes/IClientRenderable.h b/include/cstrike/Classes/IClientRenderable.h new file mode 100644 index 0000000..71ed92b --- /dev/null +++ b/include/cstrike/Classes/IClientRenderable.h @@ -0,0 +1,18 @@ +#pragma once + +class model_t; + +class IClientRenderable { + public: + virtual IClientUnknown* GetIClientUnknown() = 0; + virtual Vector const& GetRenderOrigin(void) = 0; + virtual QAngle const& GetRenderAngles(void) = 0; + + const model_t* GetModel() { + return GetVirtualFunction(this, 9)(this); + } + + bool SetupBones(matrix3x4_t* bonematrix, int maxbones, int mask, float curtime = 0) { + return GetVirtualFunction(this, 16)(this, bonematrix, maxbones, mask, curtime); + } +}; \ No newline at end of file diff --git a/include/cstrike/Classes/IClientThinkable.h b/include/cstrike/Classes/IClientThinkable.h new file mode 100644 index 0000000..074a5e7 --- /dev/null +++ b/include/cstrike/Classes/IClientThinkable.h @@ -0,0 +1,6 @@ +#pragma once + +class IClientThinkable { + public: + virtual IClientUnknown* GetIClientUnknown() = 0; +}; \ No newline at end of file diff --git a/include/cstrike/Classes/IClientUnknown.h b/include/cstrike/Classes/IClientUnknown.h new file mode 100644 index 0000000..eefbc35 --- /dev/null +++ b/include/cstrike/Classes/IClientUnknown.h @@ -0,0 +1,17 @@ +#pragma once + +class ICollideable; +class IClientRenderable; +class IClientEntity; +class C_BaseEntity; +class IClientThinkable; + +class IClientUnknown: public IHandleEntity { + public: + virtual ICollideable* GetCollideable() = 0; + virtual IClientNetworkable* GetClientNetworkable() = 0; + virtual IClientRenderable* GetClientRenderable() = 0; + virtual IClientEntity* GetIClientEntity() = 0; + virtual C_BaseEntity* GetBaseEntity() = 0; + virtual IClientThinkable* GetClientThinkable() = 0; +}; \ No newline at end of file diff --git a/include/cstrike/Classes/ICollideable.h b/include/cstrike/Classes/ICollideable.h new file mode 100644 index 0000000..98cb4a0 --- /dev/null +++ b/include/cstrike/Classes/ICollideable.h @@ -0,0 +1,10 @@ +#pragma once + +class ICollideable { + public: + virtual IHandleEntity* GetEntityHandle() = 0; + virtual const Vector& OBBMinsPreScaled() const = 0; + virtual const Vector& OBBMaxsPreScaled() const = 0; + virtual const Vector& OBBMins() const = 0; + virtual const Vector& OBBMaxs() const = 0; +}; \ No newline at end of file diff --git a/include/cstrike/Classes/IHandleEntity.h b/include/cstrike/Classes/IHandleEntity.h new file mode 100644 index 0000000..b498891 --- /dev/null +++ b/include/cstrike/Classes/IHandleEntity.h @@ -0,0 +1,8 @@ +#pragma once + +class IHandleEntity { + public: + virtual ~IHandleEntity() {}; + virtual void SetRefEHandle(const CBaseHandle& Handle) = 0; + virtual const CBaseHandle& GetRefEHandle() const = 0; +}; \ No newline at end of file diff --git a/include/cstrike/Structures/PlayerInfo.h b/include/cstrike/Structures/PlayerInfo.h index 68886c1..8508f15 100644 --- a/include/cstrike/Structures/PlayerInfo.h +++ b/include/cstrike/Structures/PlayerInfo.h @@ -10,7 +10,6 @@ typedef struct player_info_s { char friendsName[MAX_PLAYER_NAME_LENGTH]; bool fakeplayer; bool ishltv; - //bool isreplay; CRC32_t customFiles[MAX_CUSTOM_FILES]; unsigned char filesDownloaded; } player_info_t; \ No newline at end of file