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