Replace invoke_engio with invoke_lua_call
This commit is contained in:
@@ -142,7 +142,8 @@ void AIntegrationGameModeBase::InvokeEngioMove(const FString &action, const FVec
|
||||
FTCHARToUTF8 utf8action(action);
|
||||
std::string uaction(utf8action.Get(), utf8action.Length());
|
||||
FlxStreamBuffer sb;
|
||||
sb.write_string("move"); // Function name within engio
|
||||
sb.write_string("engio");
|
||||
sb.write_string("move");
|
||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::STRING);
|
||||
sb.write_string(uaction);
|
||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::VECTOR);
|
||||
@@ -152,13 +153,14 @@ void AIntegrationGameModeBase::InvokeEngioMove(const FString &action, const FVec
|
||||
std::string_view datapk = sb.view();
|
||||
FlxLockedWrapper w(LockableWrapper);
|
||||
int64 player = w.GetActor();
|
||||
w->play_invoke_engio(w.Get(), player, datapk.size(), datapk.data());
|
||||
w->play_invoke_lua_call(w.Get(), player, datapk.size(), datapk.data());
|
||||
}
|
||||
|
||||
void AIntegrationGameModeBase::ExecuteDebuggingCommand(FlxLockedWrapper &w, const FString &fs) {
|
||||
if (fs == "\\invokeplayer") {
|
||||
DPrint(TEXT("Trying to invoke 'myfunction' in lua"));
|
||||
FlxStreamBuffer sb;
|
||||
sb.write_string("engio");
|
||||
sb.write_string("myfunction");
|
||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::NUMBER);
|
||||
sb.write_double(3.0);
|
||||
@@ -168,7 +170,7 @@ void AIntegrationGameModeBase::ExecuteDebuggingCommand(FlxLockedWrapper &w, cons
|
||||
sb.write_fvector(FVector(2,3,4));
|
||||
std::string_view datapk = sb.view();
|
||||
int64 player = w.GetActor();
|
||||
w->play_invoke_engio(w.Get(), player, datapk.size(), datapk.data());
|
||||
w->play_invoke_lua_call(w.Get(), player, datapk.size(), datapk.data());
|
||||
} else {
|
||||
ConsoleOutput.AppendLine(TEXT("Unknown Command"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user