Skip to content
This repository was archived by the owner on May 1, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/sampsharp-component/proxies/extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,8 @@ extern "C" SDK_EXPORT void * __CDECL ManagedExtensionImpl_getHandle(ManagedExten
return handler->getHandle();
}

struct workaround {
void * vptr;
FlatHashMap<UID, Pair<IExtension*, bool>> miscExtensions;
};

extern "C" SDK_EXPORT IExtension * __CDECL IExtensible_getExtension_workaround(IExtensible * subject, UID extensionID)
{
// workaround for the fact that the SDK doesn't expose the miscExtensions field
// ref: https://github.com/openmultiplayer/open.mp-sdk/issues/44
workaround * w = (workaround *) subject;

auto it = w->miscExtensions.find(extensionID);
if (it != w->miscExtensions.end())
{
return it->second.first;
}

return subject->getExtension(extensionID);
}