Get sdktools and sdkhooks/dhooks to load on hl2sdk-mock (#1892)

* Build SDKTools for hl2sdk-mock

* Fix loading of extensions using advanced naming scheme for hl2sdk-mock

* Fix error on missing sv_visiblemaxplayers convar

* Build SDKHooks for hl2sdk-mock

* Fix x86_64 SourcePawn VM filename

* SDKHooks: Ignore missing IEntityListeners list in hl2sdk-mock
This commit is contained in:
peace-maker
2022-12-22 18:39:12 +01:00
committed by GitHub
parent 174bf307a2
commit 4320d7b17a
6 changed files with 17 additions and 9 deletions
-2
View File
@@ -12,8 +12,6 @@ project.sources += [
for sdk_name in SM.sdks:
sdk = SM.sdks[sdk_name]
if sdk.name == 'mock':
continue
for cxx in builder.targets:
if not cxx.target.arch in sdk.platformSpec[cxx.target.platform]:
+10 -2
View File
@@ -230,10 +230,15 @@ bool SDKHooks::SDK_OnLoad(char *error, size_t maxlength, bool late)
if (!entListeners)
{
g_pSM->Format(error, maxlength, "Failed to setup entity listeners");
#if SOURCE_ENGINE != SE_MOCK
return false;
#endif
}
else
{
entListeners->AddToTail(this);
}
entListeners->AddToTail(this);
sharesys->AddDependency(myself, "bintools.ext", true, true);
sharesys->AddNatives(myself, g_Natives);
@@ -367,7 +372,10 @@ void SDKHooks::SDK_OnUnload()
sharesys->DropCapabilityProvider(myself, this, "SDKHook_LogicalEntSupport");
CUtlVector<IEntityListener *> *entListeners = EntListeners();
entListeners->FindAndRemove(this);
if (entListeners)
{
entListeners->FindAndRemove(this);
}
gameconfs->CloseGameConfigFile(g_pGameConf);
}