mirror of
https://github.com/srcdslab/sm-ext-cssfixes.git
synced 2025-12-09 11:38:23 +00:00
Revert "fix(detour): null pointer checks, CI (#5)"
This reverts commit 9cdce6c837.
This commit is contained in:
parent
9cdce6c837
commit
c674cfdb93
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -71,7 +71,7 @@ jobs:
|
|||||||
ambuild
|
ambuild
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ runner.os }}
|
name: ${{ runner.os }}
|
||||||
path: extension/build/package
|
path: extension/build/package
|
||||||
|
|||||||
@ -433,7 +433,7 @@ DETOUR_DECL_STATIC2(DETOUR_CreateEntityByName, CBaseEntity*, const char*, classN
|
|||||||
|
|
||||||
DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *, szValue)
|
DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *, szValue)
|
||||||
{
|
{
|
||||||
CBaseEntity *pEntity = (CBaseEntity *)this;
|
CBaseEntity *pEntity = (CBaseEntity *)this;
|
||||||
|
|
||||||
// Fix crash bug in engine
|
// Fix crash bug in engine
|
||||||
if(strcasecmp(szKeyName, "angle") == 0)
|
if(strcasecmp(szKeyName, "angle") == 0)
|
||||||
@ -454,9 +454,9 @@ DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *
|
|||||||
if(pClassname && strcasecmp(pClassname, "func_buyzone") == 0)
|
if(pClassname && strcasecmp(pClassname, "func_buyzone") == 0)
|
||||||
szValue = "3";
|
szValue = "3";
|
||||||
}
|
}
|
||||||
else if(strcasecmp(szKeyName, "absvelocity") == 0)
|
else if(strcasecmp(szKeyName, "absvelocity") == 0)
|
||||||
{
|
{
|
||||||
static int m_AbsVelocity_offset = 0;
|
static int m_AbsVelocity_offset = 0;
|
||||||
|
|
||||||
if (!m_AbsVelocity_offset)
|
if (!m_AbsVelocity_offset)
|
||||||
{
|
{
|
||||||
@ -472,7 +472,7 @@ DETOUR_DECL_MEMBER2(DETOUR_KeyValue, bool, const char *, szKeyName, const char *
|
|||||||
|
|
||||||
Vector *vecAbsVelocity = (Vector*)((uint8_t*)pEntity + m_AbsVelocity_offset);
|
Vector *vecAbsVelocity = (Vector*)((uint8_t*)pEntity + m_AbsVelocity_offset);
|
||||||
vecAbsVelocity->Init(tmp[0], tmp[1], tmp[2]);
|
vecAbsVelocity->Init(tmp[0], tmp[1], tmp[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return DETOUR_MEMBER_CALL(DETOUR_KeyValue)(szKeyName, szValue);
|
return DETOUR_MEMBER_CALL(DETOUR_KeyValue)(szKeyName, szValue);
|
||||||
}
|
}
|
||||||
@ -489,9 +489,6 @@ DETOUR_DECL_MEMBER0(DETOUR_FindUseEntity, CBaseEntity *)
|
|||||||
}
|
}
|
||||||
DETOUR_DECL_MEMBER3(DETOUR_CTraceFilterSimple, void, const IHandleEntity *, passedict, int, collisionGroup, ShouldHitFunc_t, pExtraShouldHitFunc)
|
DETOUR_DECL_MEMBER3(DETOUR_CTraceFilterSimple, void, const IHandleEntity *, passedict, int, collisionGroup, ShouldHitFunc_t, pExtraShouldHitFunc)
|
||||||
{
|
{
|
||||||
if (passedict == nullptr || pExtraShouldHitFunc == nullptr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
DETOUR_MEMBER_CALL(DETOUR_CTraceFilterSimple)(passedict, collisionGroup, pExtraShouldHitFunc);
|
DETOUR_MEMBER_CALL(DETOUR_CTraceFilterSimple)(passedict, collisionGroup, pExtraShouldHitFunc);
|
||||||
|
|
||||||
// If we're in FindUseEntity right now then switch out the VTable
|
// If we're in FindUseEntity right now then switch out the VTable
|
||||||
@ -640,7 +637,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
{
|
{
|
||||||
srand((unsigned int)time(NULL));
|
srand((unsigned int)time(NULL));
|
||||||
|
|
||||||
g_iMaxPlayers = playerhelpers->GetMaxClients();
|
g_iMaxPlayers = playerhelpers->GetMaxClients();
|
||||||
|
|
||||||
char conf_error[255] = "";
|
char conf_error[255] = "";
|
||||||
if(!gameconfs->LoadGameConfigFile("CSSFixes.games", &g_pGameConf, conf_error, sizeof(conf_error)))
|
if(!gameconfs->LoadGameConfigFile("CSSFixes.games", &g_pGameConf, conf_error, sizeof(conf_error)))
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
/* Basic information exposed publicly */
|
/* Basic information exposed publicly */
|
||||||
#define SMEXT_CONF_NAME "CSSFixes"
|
#define SMEXT_CONF_NAME "CSSFixes"
|
||||||
#define SMEXT_CONF_DESCRIPTION "Patches bugs in the CSS server binary and more..."
|
#define SMEXT_CONF_DESCRIPTION "Patches bugs in the CSS server binary and more..."
|
||||||
#define SMEXT_CONF_VERSION "1.18.1"
|
#define SMEXT_CONF_VERSION "1.18"
|
||||||
#define SMEXT_CONF_AUTHOR "BotoX"
|
#define SMEXT_CONF_AUTHOR "BotoX"
|
||||||
#define SMEXT_CONF_URL ""
|
#define SMEXT_CONF_URL ""
|
||||||
#define SMEXT_CONF_LOGTAG "CSSFIXES"
|
#define SMEXT_CONF_LOGTAG "CSSFIXES"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user