Changing drv_invoke to drv_call_function

This commit is contained in:
2024-09-03 21:57:40 -04:00
parent 328451c0a4
commit 9f0f96556f
6 changed files with 19 additions and 14 deletions

View File

@@ -2,7 +2,6 @@
#include "LuaCall.h"
#include "IntegrationGameModeBase.h"
static void CheckNotEmpty(const FlxStreamBuffer &sb) {
if (sb.empty()) {
UE_LOG(LogBlueprint, Fatal, TEXT("Must use LuaCallBegin before other LuaCall steps"));
@@ -54,11 +53,11 @@ void UlxLuaCallLibrary::LuaCallAddBooleanParameter(UObject *context, bool pbool)
}
void UlxLuaCallLibrary::LuaCallInvoke(UObject *context, bool background) {
void UlxLuaCallLibrary::LuaCallInvoke(UObject *context, AActor *place) {
AIntegrationGameModeBase *mode = AIntegrationGameModeBase::GetFromContext(context);
FlxStreamBuffer &sb = mode->LuaCallGetBuffer();
CheckNotEmpty(sb);
mode->LuaCallInvoke(true);
mode->LuaCallInvoke(place);
}
@@ -74,5 +73,5 @@ void UlxLuaCallLibrary::InvokeEngioMove(UObject *context, const FString &action,
sb.write_fvector(xyz);
sb.write_simple_dynamic_tag(SimpleDynamicTag::NUMBER);
sb.write_double(facing);
mode->LuaCallInvoke(true);
mode->LuaCallInvoke(nullptr);
}