Player teleporting causes UiModeChanged event

During work on adaptation of Immersive travel mod I noticed strange interaction between teleporting of a player and UiModeChanged event. This mod works by teleporting mount, player and npcs each frame in small increments (so that it creates an illusion of smooth movement). Each player teleport causes UiModeChanged triggering with invalid data (empty table). I've created small repro scripts to demonstrate this behavior - https://gitlab.com/gbtb/teleport-uimode# . After installing the scripts, open console and run:

luag 
local core = require("openmw.core")
core.sendGlobalEvent("Teleport", true)

Each second player gets teleported to its current position (so no movement or loading whatsoever). And you can see in F10 console an empty event data from UiModeChangedHandler.

I didn't look into code but I can speculate maybe it's triggered because each teleport assumes it needs to do loading of a cell or something, but when teleporting to close or the same position it's not actually happens. This behavior doesn't cause much trouble for me, wrong events can be filtered, but I think maybe it's a symptom of some other problem, plus excessive events could hurt performance, I guess?

  • Is the problem OpenMW specific or does it also happen in vanilla Morrowind? Openmw-only
  • What is your operating system? NixOS 24.11
  • What version of OpenMW are you using? If you used a bleeding edge build, state the exact revision used. openmw-49-rc6
  • What version of Morrowind are you using (i.e. retail CD or Steam)? What addons (Tribunal, Bloodmoon) do you have installed? What language is your Morrowind install? MTB 1C Ru
  • Do you use any mods? If so, does the problem also occur in a clean vanilla install without any mods? Reproduced on a clean game