Fix a bug in PLAY_INVOKE_ENGIO

This commit is contained in:
2024-08-09 13:11:03 -04:00
parent a08ce7ed0f
commit 09ca9be955

View File

@@ -221,7 +221,7 @@ enum DrvAction {
PLAY_NOTIFY_CLOSE,
PLAY_NOTIFY_ACCEPT,
PLAY_CALL_EVENT_UPDATE,
PLAY_INVOKE_PLAYER,
PLAY_INVOKE_ENGIO,
PLAY_INVOKE_LUA_SOURCE,
PLAY_RELEASE,
};
@@ -235,7 +235,7 @@ inline static const char *action_string(DrvAction act) {
case PLAY_NOTIFY_CLOSE: return "PLAY_NOTIFY_CLOSE";
case PLAY_NOTIFY_ACCEPT: return "PLAY_NOTIFY_ACCEPT";
case PLAY_CALL_EVENT_UPDATE: return "PLAY_CALL_EVENT_UPDATE";
case PLAY_INVOKE_PLAYER: return "PLAY_INVOKE_PLAYER";
case PLAY_INVOKE_ENGIO: return "PLAY_INVOKE_ENGIO";
case PLAY_INVOKE_LUA_SOURCE: return "PLAY_INVOKE_LUA_SOURCE";
case PLAY_RELEASE: return "PLAY_RELEASE";
default: return "unknown";
@@ -821,7 +821,7 @@ static void replay_invoke_event_update(EngineWrapper *w) {
void play_invoke_engio(EngineWrapper *w, int64_t place, uint32_t datapklen, const char *datapk) {
assert(w->rlog == nullptr);
if (w->wlog != nullptr) {
w->wlog->write_cmd_hash(PLAY_INVOKE_PLAYER, eng::memhash());
w->wlog->write_cmd_hash(PLAY_INVOKE_ENGIO, eng::memhash());
w->wlog->write_int64(place);
w->wlog->write_string(std::string_view(datapk, datapklen));
w->wlog->flush();
@@ -932,7 +932,7 @@ static void replaycore_step(EngineWrapper *w) {
case PLAY_NOTIFY_CLOSE: replay_notify_close(w); return;
case PLAY_NOTIFY_ACCEPT: replay_notify_accept(w); return;
case PLAY_CALL_EVENT_UPDATE: replay_invoke_event_update(w); return;
case PLAY_INVOKE_PLAYER: replay_invoke_lua_source(w); return;
case PLAY_INVOKE_ENGIO: replay_invoke_engio(w); return;
case PLAY_INVOKE_LUA_SOURCE: replay_invoke_lua_source(w); return;
case PLAY_RELEASE: release(w); return;
default: return reset_wrapper(w, "Replay log corrupt in command dispatcher");