sezero / quakespasm

QuakeSpasm -- A modern, cross-platform Quake game engine based on FitzQuake.
https://sourceforge.net/projects/quakespasm/
GNU General Public License v2.0
239 stars 95 forks source link

fix/bug: ext texture loading for unnamed textures #29

Closed timbergeron closed 2 years ago

timbergeron commented 2 years ago

A few map developers forgot to name textures in their maps and therefore they do not currently load.

The most popular map where this happens is aerowalk, which has 3 unnamed textures.

unnamed16 unnamed17 unnamed10

Other popular maps I've discovered with unnamed textures: cmt4, ctf5

FTE fix in Mod_LoadTextures (gl_model.c)

if (!tx->name[0]) { q_snprintf(tx->name, sizeof(tx->name), "unnamed%d", i); Con_DPrintf("Warning: unnamed texture in %s, renaming to %s\n", loadmodel->name, tx->name); }

sezero commented 2 years ago

That assumes that empty-named textures will have those unnamed%d counterparts which sounds silly. Does this truly work? @andrei-drexler?

(Besides, doing mappers' job like this shouldn't fall into engine's hand.)

timbergeron commented 2 years ago

imagelist without code:

1

imagelist with code:

2

quark textures:

Capture

sezero commented 2 years ago

I don't want to encourage mapper laziness or silliness.

Has any other engine such as ironwail or vkquake adopt this thing? I do hope that they haven't.

timbergeron commented 2 years ago

food for thought:

1) Loading external textures as a feature would be best to load ALL textures in a given map, regardless of how a map is designed 2) Net effect is the most popular netquake engine has a feature that doesn't load 3 ext textures on one of the most popular maps ever

andrei-drexler commented 2 years ago

Normally I'd agree that we shouldn't encourage carelessness, but if there are high-profile maps out there with this issue, with replacement textures already relying on this convention, I think that ship has sailed. The best solution IMO is to add the fix, but also change the Con_DPrintf to a Con_Warning to make sure that this doesn't go unnoticed in any new maps.

sezero commented 2 years ago

We need to know which train is it we missed then, at the least. I still very much dislike the idea and not want to apply such a patch, though.

sezero commented 2 years ago

Also: @ericwa, @Novum: what do you guys think?

sezero commented 2 years ago

Well, looking at it more, this is not a bug, not ours at all. Closing as WONTFIX.