增加玩家管理(没做完,需要steamid绑定名字啥的)

This commit is contained in:
Huoji's
2023-10-01 22:13:20 +08:00
parent fb67632502
commit 1bae80e38d
681 changed files with 391721 additions and 218 deletions

View File

@@ -8,10 +8,10 @@
class CEntityIdentity
{
public:
CBaseEntity *entity;
void *dunno;
int64_t unk0;
int64_t unk1;
CBaseEntity *entity; //0
void *dunno; //8
int64_t unk0; //12
int64_t unk1; //16
const char *internalName;
const char *entityName;
void *unk2;

View File

@@ -11,14 +11,20 @@ public:
auto Schema_DynamicBinding() {
SchemaClassInfoData_t* rv = nullptr;
CALL_VIRTUAL(void, 0, this, &rv);
CALL_VIRTUAL(void, 34, this, &rv);
return rv;
}
auto GetRefEHandle() {
CHandle handle;
CALL_VIRTUAL(void*, 2, this, &handle);
return handle;
char* pIdentity = (char*)m_pEntity();
auto v3 = *(uint32_t*)(pIdentity + 16);
auto v4 = ENT_ENTRY_MASK;
auto v5 = ((v3 >> 15) - (*(uint32_t*)(pIdentity + 48) & 1)) << 15;
if (v3 != -1) {
v4 = *(uint32_t*)(pIdentity + 16) & ENT_ENTRY_MASK;
}
return CHandle(v4 | v5);
}
SCHEMA_FIELD(CEntityIdentity*, m_pEntity);
@@ -26,7 +32,7 @@ public:
};
class CBaseEntity : CEntityInstance
class CBaseEntity : public CEntityInstance
{
public:
DECLARE_CLASS(CBaseEntity);

View File

@@ -2,7 +2,8 @@
#include <cstdint>
#define INVALID_EHANDLE_INDEX 0xFFFFFFFF
#define ENT_ENTRY_MASK 0x7FFF
inline int PlayerSlot_to_EntityIndex(int PlayerSlot) { return PlayerSlot + 1; }
inline int EntityIndex_to_PlayerSlot(int EntityIndex) { return EntityIndex - 1; }
class CBaseEntity;
class CHandle
@@ -21,6 +22,8 @@ public:
{
return reinterpret_cast<T*>(GetBaseEntity());
}
auto GetPlayerSlot() {
return m_Index - 1;
}
uint32_t m_Index;
};