Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b834c6e1c1 | ||
|
|
5b4b1ab76c | ||
|
|
e98357009d | ||
|
|
6d701fe051 |
@@ -0,0 +1,24 @@
|
|||||||
|
name: Dependabot auto-merge
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
enableAutoMerge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
||||||
|
steps:
|
||||||
|
- name: Enable auto-merge for Dependabot PRs
|
||||||
|
run: gh pr merge --auto --merge "$PR_URL"
|
||||||
|
env:
|
||||||
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.1.1
|
1.1.2
|
||||||
|
|||||||
@@ -22,6 +22,11 @@ for sdk_name in Extension.sdks:
|
|||||||
|
|
||||||
Extension.AddCDetour(binary)
|
Extension.AddCDetour(binary)
|
||||||
|
|
||||||
|
# Silence fatal errors on unrecognized Clang warning flags from CDetour
|
||||||
|
if cxx.family in ['gcc', 'clang']:
|
||||||
|
binary.compiler.cflags += ['-Wno-unknown-warning-option']
|
||||||
|
binary.compiler.cxxflags += ['-Wno-unknown-warning-option']
|
||||||
|
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(sdk['path'], 'game', 'server'),
|
os.path.join(sdk['path'], 'game', 'server'),
|
||||||
]
|
]
|
||||||
|
|||||||
+22
-4
@@ -217,6 +217,23 @@ inline int GetDataMapOffset(CBaseEntity *pEnt, const char *pName, typedescriptio
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* GetEntityName(CBaseEntity* pEntity)
|
||||||
|
{
|
||||||
|
static char buffer[256];
|
||||||
|
|
||||||
|
typedescription_t* td = nullptr;
|
||||||
|
int offset = GetDataMapOffset(pEntity, "m_iName", &td);
|
||||||
|
|
||||||
|
if (offset != -1) {
|
||||||
|
string_t name = *(string_t*)((uintptr_t)(pEntity) + offset);
|
||||||
|
if (name.ToCStr() && name.ToCStr()[0] != '\0')
|
||||||
|
return name.ToCStr();
|
||||||
|
}
|
||||||
|
|
||||||
|
snprintf(buffer, sizeof(buffer), "#%d", gamehelpers->EntityToReference(pEntity));
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
inline CBaseEntityOutput *GetOutput(CBaseEntity *pEntity, const char *pOutput, typedescription_t **ppTypeDesc=NULL)
|
inline CBaseEntityOutput *GetOutput(CBaseEntity *pEntity, const char *pOutput, typedescription_t **ppTypeDesc=NULL)
|
||||||
{
|
{
|
||||||
typedescription_t *pTypeDesc = NULL;
|
typedescription_t *pTypeDesc = NULL;
|
||||||
@@ -398,7 +415,7 @@ cell_t GetOutputValue(IPluginContext *pContext, const cell_t *params)
|
|||||||
case FIELD_BOOLEAN:
|
case FIELD_BOOLEAN:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return pContext->ThrowNativeError("%s value is not an integer (%d)", pOutput, pEntityOutput->m_Value.fieldType);
|
return pContext->ThrowNativeError("Entity '%s': %s value is not an integer (%d)", GetEntityName(pEntity), pOutput, pEntityOutput->m_Value.fieldType);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (cell_t)pEntityOutput->m_Value.iVal;
|
return (cell_t)pEntityOutput->m_Value.iVal;
|
||||||
@@ -423,7 +440,7 @@ cell_t GetOutputValueFloat(IPluginContext *pContext, const cell_t *params)
|
|||||||
case FIELD_TIME:
|
case FIELD_TIME:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return pContext->ThrowNativeError("%s value is not a float (%d)", pOutput, pEntityOutput->m_Value.fieldType);
|
return pContext->ThrowNativeError("Entity '%s': %s value is not a float (%d)", GetEntityName(pEntity), pOutput, pEntityOutput->m_Value.fieldType);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sp_ftoc((cell_t)pEntityOutput->m_Value.flVal);
|
return sp_ftoc((cell_t)pEntityOutput->m_Value.flVal);
|
||||||
@@ -450,7 +467,8 @@ cell_t GetOutputValueString(IPluginContext *pContext, const cell_t *params)
|
|||||||
case FIELD_SOUNDNAME:
|
case FIELD_SOUNDNAME:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return pContext->ThrowNativeError("%s value is not a string (%d)", pOutput, pEntityOutput->m_Value.fieldType);
|
return pContext->ThrowNativeError("Entity '%s': %s value is not a string (%d)", GetEntityName(pEntity), pOutput, pEntityOutput->m_Value.fieldType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t len;
|
size_t len;
|
||||||
@@ -478,7 +496,7 @@ cell_t GetOutputValueVector(IPluginContext *pContext, const cell_t *params)
|
|||||||
case FIELD_TIME:
|
case FIELD_TIME:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return pContext->ThrowNativeError("%s value is not a float (%d)", pOutput, pEntityOutput->m_Value.fieldType);
|
return pContext->ThrowNativeError("Entity '%s': %s value is not a float (%d)", GetEntityName(pEntity), pOutput, pEntityOutput->m_Value.fieldType);
|
||||||
}
|
}
|
||||||
|
|
||||||
cell_t *vec;
|
cell_t *vec;
|
||||||
|
|||||||
Reference in New Issue
Block a user