From 79c15c74377848e73cbbdef8cb4e0a738786712a Mon Sep 17 00:00:00 2001 From: Miepee Date: Mon, 24 Jun 2024 12:37:35 +0200 Subject: [PATCH] Fix room hud and MW not registering on new room --- YAMS-LIB/patches/Multiworld.cs | 2 +- YAMS-LIB/patches/qol/DisplayRoomNameOnHUD.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/YAMS-LIB/patches/Multiworld.cs b/YAMS-LIB/patches/Multiworld.cs index 99dee02..6d056ea 100644 --- a/YAMS-LIB/patches/Multiworld.cs +++ b/YAMS-LIB/patches/Multiworld.cs @@ -148,7 +148,7 @@ public static void Apply(UndertaleData gmData, GlobalDecompileContext decompileC - oControl.EventHandlerFor(EventType.Other, EventSubtypeOther.User4, gmData).AppendGMLInCode(""" + oControl.EventHandlerFor(EventType.Other, EventSubtypeOther.RoomStart, gmData).AppendGMLInCode(""" mw_debug("Player has changed their room") send_room_info_packet(); """); diff --git a/YAMS-LIB/patches/qol/DisplayRoomNameOnHUD.cs b/YAMS-LIB/patches/qol/DisplayRoomNameOnHUD.cs index 2ef412b..e9223a4 100644 --- a/YAMS-LIB/patches/qol/DisplayRoomNameOnHUD.cs +++ b/YAMS-LIB/patches/qol/DisplayRoomNameOnHUD.cs @@ -44,7 +44,7 @@ public static void Apply(UndertaleData gmData, GlobalDecompileContext decompileC draw_surface_ext(rnh_surface, (oControl.displayx - d[0]), (oControl.displayy - d[1]), oControl.display_scale, oControl.display_scale, 0, -1, 1) """); - var roomNameHudRoomStart = roomHudObject.EventHandlerFor(EventType.Other, EventSubtypeOther.User4, gmData); + var roomNameHudRoomStart = roomHudObject.EventHandlerFor(EventType.Other, EventSubtypeOther.RoomStart, gmData); roomNameHudRoomStart.SubstituteGMLCode( """ var newRoomName = ds_map_find_value(roomNames, room_get_name(room)) if (global.ingame && textToDisplay != newRoomName)