From 905950cf528fd2e8d292b875502f6670eaadc764 Mon Sep 17 00:00:00 2001 From: Dregu Date: Wed, 8 Nov 2023 00:57:13 +0200 Subject: [PATCH] Revert "better text box cancelling" This reverts commit 97ae60bba16dbd93f4148bc989e8e50d61bfaad1. --- src/game_api/script/lua_vm.cpp | 2 -- src/game_api/script/usertypes/state_lua.cpp | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/game_api/script/lua_vm.cpp b/src/game_api/script/lua_vm.cpp index a7bb84f69..53a014bd9 100644 --- a/src/game_api/script/lua_vm.cpp +++ b/src/game_api/script/lua_vm.cpp @@ -680,14 +680,12 @@ end /// Show a message that looks like a level feeling. lua["toast"] = [](std::u16string message) { - State::get().ptr()->toast = 0; static auto toast_fun = (Toast*)get_address("toast"); toast_fun(message.c_str()); }; /// Show a message coming from an entity lua["say"] = [](uint32_t entity_uid, std::u16string message, int sound_type, bool top) { - State::get().ptr()->speechbubble = 0; static auto say = (Say*)get_address("speech_bubble_fun"); const auto hud = get_hud(); diff --git a/src/game_api/script/usertypes/state_lua.cpp b/src/game_api/script/usertypes/state_lua.cpp index 5538b0802..a8a899a5b 100644 --- a/src/game_api/script/usertypes/state_lua.cpp +++ b/src/game_api/script/usertypes/state_lua.cpp @@ -532,12 +532,12 @@ void register_usertypes(sol::state& lua) lua["cancel_toast"] = []() { - State::get().ptr()->toast = 0; + State::get().ptr()->toast_timer = 1000; }; lua["cancel_speechbubble"] = []() { - State::get().ptr()->speechbubble = 0; + State::get().ptr()->speechbubble_timer = 1000; }; } }; // namespace NState