Move queued invocations down into lpxserver/lpxclient

This commit is contained in:
2024-09-03 22:44:22 -04:00
parent 3ed9a7ee2d
commit a6e68cbb35
4 changed files with 25 additions and 21 deletions

View File

@@ -165,12 +165,6 @@ void DrivenEngine::set_console_prompt(const eng::string &prompt) {
console_prompt_ = prompt;
}
eng::vector<UniqueInvocation> DrivenEngine::get_queued_invocations() {
eng::vector<UniqueInvocation> result = std::move(queued_invocations_);
queued_invocations_.clear();
return result;
}
void DrivenEngine::rescan_lua_source() {
rescan_lua_source_ = true;
}
@@ -483,8 +477,9 @@ void DrivenEngine::drv_update(double clock) {
void DrivenEngine::drv_call_function(InvocationKind kind, int64_t place, uint32_t datapklen, const char *datapk) {
Invocation *inv = new Invocation(kind, visible_actor_id_, place, std::string_view(datapk, datapklen));
queued_invocations_.emplace_back(inv);
// This next line is a hack, because the DrivenEngine is not supposed to care about 'kind'.
if (kind == InvocationKind::LUA_SOURCE) rescan_lua_source_ = false;
event_call_function(kind, place, std::string_view(datapklen, datapk));
}
//////////////////////////////////////////////////////////////////////////////