Skip to content

Commit

Permalink
fix: add entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
futrime committed Jan 22, 2024
1 parent 8fe06c3 commit 168fe2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
11 changes: 11 additions & 0 deletions src/DllMain.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <ll/api/plugin/NativePlugin.h>

extern void entry();

extern "C" {
_declspec(dllexport) bool ll_plugin_load(ll::plugin::NativePlugin& self) {
entry();

return true;
}
}
1 change: 1 addition & 0 deletions src/api/EventAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ bool LLSECallEventsOnHotLoad(ScriptEngine* engine) {
bool LLSECallEventsOnHotUnload(ScriptEngine* engine) {
ll::service::getLevel()->forEachPlayer([&](Player& pl) -> bool {
FakeCallEvent(engine, EVENT_TYPES::onLeft, PlayerClass::newPlayer(&pl));
return true;
});
for (auto& [index, cb] : ENGINE_GET_DATA(engine)->unloadCallbacks) {
cb(engine);
Expand Down
22 changes: 0 additions & 22 deletions src/main/dllmain.cpp

This file was deleted.

0 comments on commit 168fe2f

Please sign in to comment.