Add client entity class headers.
* Remove 'isreplay' from player_info_s. Signed-off-by: aixxe <me@aixxe.net>
This commit is contained in:
parent
f155818ed3
commit
da0e8efd27
|
@ -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;
|
||||||
|
};
|
|
@ -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;
|
||||||
|
};
|
|
@ -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;
|
||||||
|
};
|
|
@ -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<const model_t*(*)(void*)>(this, 9)(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SetupBones(matrix3x4_t* bonematrix, int maxbones, int mask, float curtime = 0) {
|
||||||
|
return GetVirtualFunction<bool(*)(IClientRenderable*, matrix3x4_t*, int, int, float)>(this, 16)(this, bonematrix, maxbones, mask, curtime);
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,6 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
class IClientThinkable {
|
||||||
|
public:
|
||||||
|
virtual IClientUnknown* GetIClientUnknown() = 0;
|
||||||
|
};
|
|
@ -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;
|
||||||
|
};
|
|
@ -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;
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
class IHandleEntity {
|
||||||
|
public:
|
||||||
|
virtual ~IHandleEntity() {};
|
||||||
|
virtual void SetRefEHandle(const CBaseHandle& Handle) = 0;
|
||||||
|
virtual const CBaseHandle& GetRefEHandle() const = 0;
|
||||||
|
};
|
|
@ -10,7 +10,6 @@ typedef struct player_info_s {
|
||||||
char friendsName[MAX_PLAYER_NAME_LENGTH];
|
char friendsName[MAX_PLAYER_NAME_LENGTH];
|
||||||
bool fakeplayer;
|
bool fakeplayer;
|
||||||
bool ishltv;
|
bool ishltv;
|
||||||
//bool isreplay;
|
|
||||||
CRC32_t customFiles[MAX_CUSTOM_FILES];
|
CRC32_t customFiles[MAX_CUSTOM_FILES];
|
||||||
unsigned char filesDownloaded;
|
unsigned char filesDownloaded;
|
||||||
} player_info_t;
|
} player_info_t;
|
Loading…
Reference in New Issue