From b7355e362dabdbdb1e6ee1dc91db8f352e391543 Mon Sep 17 00:00:00 2001 From: KobeBryant114514 <116721335+KobeBryant114514@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:02:33 +0800 Subject: [PATCH] fix: fix #30 --- src/LegacyServerApi.cpp | 4 ++-- xmake.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LegacyServerApi.cpp b/src/LegacyServerApi.cpp index ccb9313..2218d7e 100644 --- a/src/LegacyServerApi.cpp +++ b/src/LegacyServerApi.cpp @@ -38,7 +38,7 @@ void Export_Legacy_GMLib_ServerAPI() { "GMLib_ServerAPI", "spawnEntity", [](std::pair pos, std::string const& name) -> Actor* { - return GMLIB_Spawner::spawnEntity(pos.first, pos.second, name); + return GMLIB_Spawner::spawnEntity(pos.first, pos.second, name).as_ptr(); } ); RemoteCall::exportAs( @@ -46,7 +46,7 @@ void Export_Legacy_GMLib_ServerAPI() { "shootProjectile", [](Actor* owner, std::string const& name, float speed, float offset) -> Actor* { auto ac = (GMLIB_Actor*)owner; - return ac->shootProjectile(name, speed, offset); + return ac->shootProjectile(name, speed, offset).as_ptr(); } ); RemoteCall::exportAs( diff --git a/xmake.lua b/xmake.lua index 435db9f..8452b4b 100644 --- a/xmake.lua +++ b/xmake.lua @@ -8,7 +8,7 @@ if not has_config("vs_runtime") then end -- Option 1: Use the latest version of LeviLamina released on GitHub. -add_requires("levilamina") +add_requires("levilaminalibrary") add_requires("legacyremotecall") add_requires("gmlib") @@ -59,7 +59,7 @@ target("GMLIB-LegacyRemoteCallApi") -- Change this to your plugin name. "src" ) add_packages( - "levilamina", + "levilaminalibrary", "legacyremotecall", "gmlib" )