Unvanquished / Unvanquished

An FPS/RTS hybrid game powered by the Daemon engine (a combination of ioq3 and XreaL)
https://unvanquished.net
Other
977 stars 161 forks source link

New quick map listing cannot find levelshot from delta map package #2225

Open illwieckz opened 2 years ago

illwieckz commented 2 years ago

On one hand, distributing a delta map package as a released map isn't a good idea, but it's handy for things like the nightly server.

People may still want to make a map delta package just to ship newer navmeshes or things like that. In the past I did that on my game server to add a minimap to parpax as released parpax didn't have one.

Since we assume map-<name>_<ver>.dpk[dir] contains maps/<name>.bsp and meta/<name>/<name>.<ext> we cannot read the levelshot if the levelshot is in a deps, that happens with a delta package.

[FS] Loading pakdir 'UnvanquishedAssets/build/test/map-chasm_test.dpkdir/'... 
Warn: Couldn't find image file 'meta/chasm/chasm' 
Warn: Failed to load texture from meta/chasm/chasm. 
[FS] Loading pakdir 'UnvanquishedAssets/build/test/map-vega_test.dpkdir/'... 
Warn: Couldn't find image file 'meta/vega/vega' 
Warn: Failed to load texture from meta/vega/vega. 

I assume this is introduced by 10b448eababe975b7fc71749a001bb192e157505.

slipher commented 2 years ago

It would still work if not for one of the commits I added in https://github.com/DaemonEngine/Daemon/pull/601:

FS::LoadPathPrefix - don't load dependencies

From the gamelogic, it's still possible to load a prefix with
dependencies by directly using the syscall with different arguments.

I don't remember why I did that. Maybe because of how it's used wrt legacy paks, or maybe because the map list is too slow with it.

Anyway, as stated in the message, it's possible to load a prefix with deps by using a FSPakPathLoadPakMsg instead of the LoadPakPrefix helper function. If this does turn out too slow, maybe we could load with deps only if the image is not found upon loading without deps.

illwieckz commented 2 years ago

I'm not sure to understand everything, but yes I'm thinking about trying direct image access and fallback on slower code if not found.