Update SDKTools IgniteEntity for Synergy

Add missing parameter for IgniteEntity used in Synergy.
This commit is contained in:
Balim 2025-04-19 08:53:38 -07:00 committed by GitHub
parent 2a25025d2e
commit 74ab2d4f9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -378,6 +378,23 @@ static cell_t IgniteEntity(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("\"Ignite\" wrapper failed to initialize");
}
}
else if (!strcmp(g_pSM->GetGameFolderName(), "synergy"))
{
ValvePassInfo pass[5];
InitPass(pass[0], Valve_Float, PassType_Float, PASSFLAG_BYVAL);
InitPass(pass[1], Valve_Bool, PassType_Basic, PASSFLAG_BYVAL);
InitPass(pass[2], Valve_Float, PassType_Float, PASSFLAG_BYVAL);
InitPass(pass[3], Valve_Bool, PassType_Basic, PASSFLAG_BYVAL);
InitPass(pass[4], Valve_CBaseEntity, PassType_Basic, PASSFLAG_BYVAL);
if (!CreateBaseCall("Ignite", ValveCall_Entity, NULL, pass, 5, &pCall))
{
return pContext->ThrowNativeError("\"Ignite\" not supported by this mod");
}
else if (!pCall)
{
return pContext->ThrowNativeError("\"Ignite\" wrapper failed to initialize");
}
}
else
#endif // SDK2013
{
@ -422,6 +439,10 @@ static cell_t IgniteEntity(IPluginContext *pContext, const cell_t *params)
*(int *) (vptr + pCall->vparams[4].offset) = 0;
*(int *) (vptr + pCall->vparams[5].offset) = 0;
}
else if (!strcmp(g_pSM->GetGameFolderName(), "synergy"))
{
*(CBaseEntity **) (vptr + pCall->vparams[4].offset) = nullptr; // pAttacker
}
#elif SOURCE_ENGINE == SE_MCV
*(CBaseEntity **) (vptr + pCall->vparams[4].offset) = nullptr; // pAttacker
*(string_t *) (vptr + pCall->vparams[5].offset) = NULL_STRING; // sRootWeaponClassname