Maybe I'm wrong. I did not check OTCv8 code, but it makes sense, that you have to check in your Lua code floor and position, and check 'onWalk', if position is on player screen. How could it work to attach some widget to Tile ex. x=12345, y=12345, z=15
, if player does not see given Tile on his screen? Given Tile (C++ object) is not defined in RAM at all.
Of course it could (by checking it all in C++ [onWalk]), but then - for other users -, it would waste CPU/RAM. Right now it probably removes Tile and it's attached widget when player moves XX tiles away from it.
I think he meant C++ changes in OTS and OTC, to transfer extra information (ex. text), when new tile appears on player screen (protocolgame.cpp
, protocolgameparse.cpp
).
On new OTS engines, you can execute onMove
Lua event on server side to detect new tiles appearing on screen and send extra texts attached to them, but it would be a huge waste of CPU. Code on server side would be the same as you do on client side (check floor and position), just waste server CPU, not client CPU.
If positions and texts are static and you use client updater (you can update them later), then use Lua script on client side to detect floors/positions and do not waste server CPU for it.