Player icon indicating copy to clipboard operation
Player copied to clipboard

Player web does not load non-lcf files properly

Open elsemieni opened this issue 8 months ago • 1 comments

Tested on player-web-master.

There is an issue related with player-web and projects mixed with LCF and XML (generated with lcf2xml - emu, edb, etc) files.

Let's put a minimal project with a Map0001.emu as inital scenario (with Map0001.lmu deleted). In a normal-nonweb-executable Player is able to load Map0001.emu normally (and if Map0001.lmu exists, it will load Map0001.emu first). However, that's not the scenario at player-web.

For reference this is an extract from the output of gencache regarding Map0001.emu:

"map0001.emu":"Map0001.emu",

Right, if you load the game, the game freezes with the following log on console:

index.js:1 Loading of Map Map0001.lmu failed.
The map was not found.
(Stack trace ommited as it was compilled and seems nonsense, plus the error is quite understandable).

index.js:1 Uncaught 
ErrnoError {name: 'ErrnoError', node: undefined, errno: 44, message: 'FS error', setErrno: ƒ, …} 

This happens in both cases when this is the start map and when you want to transfer player to that map.

If I put Map0001.lmu and Map0001.emu together, gencache generate the following output:

"map0001.emu":"Map0001.emu","map0001.lmu":"Map0001.lmu"

And player-web loads Map0001.lmu instead emu.

The following combination in gencache makes emu maps working, but that's not the ideal scenario:

"map0001.lmu":"Map0001.emu"

@jetrotal and @Ghabry 's told in chat, told that the inverting order of apperance on gencache makes emu map work when both files exist, however, tried that and Player insist to load lmu file instead.

elsemieni avatar Jun 23 '24 17:06 elsemieni