Skip to content

Commit

Permalink
Update CSSDK
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Aug 24, 2023
1 parent 4155dd4 commit f25c910
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
24 changes: 15 additions & 9 deletions reapi/include/cssdk/dlls/API/CSEntity.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ class CCSEntity
virtual void FireBuckshots(ULONG cShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iTracerFreq, int iDamage, entvars_t *pevAttacker) = 0;
virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand) = 0;

public:
CBaseEntity *m_pContainingEntity;

private:
#if defined(_MSC_VER)
#pragma region reserve_vfuncs_Region
#pragma region reserve_data_Region
#endif
int CCSEntity_Reserve[0x1000];
virtual void func_reserve1() {};
virtual void func_reserve2() {};
virtual void func_reserve3() {};
Expand Down Expand Up @@ -79,37 +84,38 @@ class CCSEntity
#if defined(_MSC_VER)
#pragma endregion
#endif

public:
CBaseEntity *m_pContainingEntity;
};

class CCSDelay: public CCSEntity
{
DECLARE_CLASS_TYPES(CCSDelay, CCSEntity);
public:

private:
int CCSDelay_Reserve[0x100];
};

class CCSAnimating: public CCSDelay
{
DECLARE_CLASS_TYPES(CCSAnimating, CCSDelay);
public:

private:
int CCSAnimating_Reserve[0x100];
};

class CCSToggle: public CCSAnimating
{
DECLARE_CLASS_TYPES(CCSToggle, CCSAnimating);
public:

private:
int CCSToggle_Reserve[0x100];
};

class CCSMonster: public CCSToggle
{
DECLARE_CLASS_TYPES(CCSMonster, CCSToggle);
public:

private:
int CCSMonster_Reserve[0x100];
};

#define CSENTITY_API_INTERFACE_VERSION "CSENTITY_API_INTERFACE_VERSION002"
#define CSENTITY_API_INTERFACE_VERSION "CSENTITY_API_INTERFACE_VERSION003"
6 changes: 6 additions & 0 deletions reapi/include/cssdk/dlls/cbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class CBaseEntity

public:
CCSEntity *m_pEntity; // NOTE: it was replaced on member "int *current_ammo" because it is useless.
CCSEntity *CSEntity() const;

// We use this variables to store each ammo count.
float currentammo;
Expand Down Expand Up @@ -253,6 +254,11 @@ inline void CBaseEntity::SetBlocked(std::nullptr_t)
m_pfnBlocked = nullptr;
}

inline CCSEntity *CBaseEntity::CSEntity() const
{
return m_pEntity;
}

class CPointEntity: public CBaseEntity
{
DECLARE_CLASS_TYPES(CPointEntity, CBaseEntity);
Expand Down
6 changes: 6 additions & 0 deletions reapi/src/mods/mod_regamedll_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ bool RegamedllApi_Init()
if (!g_ReGameApi->BGetICSEntity(CSENTITY_API_INTERFACE_VERSION))
{
UTIL_ServerPrint("[%s]: Interface CCSEntity API version '%s' not found.\n", Plugin_info.logtag, CSENTITY_API_INTERFACE_VERSION);

if (g_ReGameApi->BGetICSEntity("CSENTITY_API_INTERFACE_VERSION002"))
UTIL_ServerPrint("[%s]: Please update ReGameDLL to the latest version.\n", Plugin_info.logtag);
else
UTIL_ServerPrint("[%s]: Please update ReAPI to the latest version.\n", Plugin_info.logtag);

return false;
}

Expand Down

0 comments on commit f25c910

Please sign in to comment.