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

@@ -43,7 +43,7 @@ AIntegrationGameModeBase::~AIntegrationGameModeBase()
uint32 AIntegrationGameModeBase::Run() {
FlxLockedWrapper lockedwrap(LockableWrapper);
Sockets->Update(lockedwrap);
lockedwrap->play_invoke_event_update(lockedwrap.Get(), EngineSeconds);
lockedwrap->play_update(lockedwrap.Get(), EngineSeconds);
Sockets->Update(lockedwrap);
return 0;
}
@@ -156,14 +156,17 @@ void AIntegrationGameModeBase::UpdateTangibles() {
// std::string_view datapk = sb.view();
// FlxLockedWrapper w(LockableWrapper);
// int64 player = w.GetActor();
// w->play_invoke_lua_call(w.Get(), player, datapk.size(), datapk.data());
// w->play_call_function_lua_call(w.Get(), player, datapk.size(), datapk.data());
// }
void AIntegrationGameModeBase::LuaCallInvoke(bool background) {
void AIntegrationGameModeBase::LuaCallInvoke(AActor *place) {
std::string_view datapk = LuaCallBuffer.view();
FlxLockedWrapper w(LockableWrapper);
int64 player = w.GetActor();
w->play_invoke_lua_call(w.Get(), player, datapk.size(), datapk.data());
int64_t place_id = w.GetActor();
if (place != nullptr) {
place_id = UlxTangible::GetActorTangible(place)->TangibleId;
}
w->play_call_function(w.Get(), InvocationKind::LUA_CALL, place_id, datapk.size(), datapk.data());
}
void AIntegrationGameModeBase::ExecuteDebuggingCommand(FlxLockedWrapper &w, const FString &fs) {
@@ -180,13 +183,12 @@ 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_lua_call(w.Get(), player, datapk.size(), datapk.data());
w->play_call_function(w.Get(), InvocationKind::LUA_CALL, player, datapk.size(), datapk.data());
} else {
ConsoleOutput.AppendLine(TEXT("Unknown Command"));
}
}
void AIntegrationGameModeBase::ConsoleSendInput(const FString& fs)
{
if (fs.IsEmpty()) {