TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
582 stars 152 forks source link

CONTENTS_DONOTENTER_LARGE surfaceparm is misspelled #571

Closed Aciz closed 6 years ago

Aciz commented 6 years ago

For RTCW & ET, contentflag CONTENTS_DONOTENTER_LARGE is misspelled in the q3map2 game header files. These files read it as nonotenterlarge, while both games expect donotenterlarge. This results in either the game or q3map2 being unable to read the surfaceparm correctly, thus resulting the contents flag not working.

q3map2 headers

RTCW shader infoparms

ET shader infoparms

ensiform commented 6 years ago

@Aciz seems to me like an autocorrect faux pas. Good find

Garux commented 6 years ago

+1 on good find! It works tho, if you are using misspelled version in your shader :)

TTimo commented 6 years ago

Isn't @Garux on to something here?

Does the game engine need to read "donotenterlarge" in a shader somewhere, at all for this?

I haven't investigated into the engines code, but my understanding is that q3map2 will produce a .bsp and set the 0x400000 bit on the surface. Then the game will work off of that bit value and whatever string is in tr_shader.c isn't going to matter? Except maybe to print some surface properties for debug or similar.

Also, there are apparently two shader keywords you could use to set the bit already: https://github.com/TTimo/GtkRadiant/search?utf8=%E2%9C%93&q=W_CONT_DONOTENTER_LARGE&type=

Assuming there are maps and shaders out there that use this feature, I don't think we can remove those keywords. Maybe we want to add a new one that says "donotenterlarge" to provide a third option with no typo ..

Garux commented 6 years ago

True, engine only requires correct bit @TTimo something like what =:)?

Aciz commented 6 years ago

I'm pretty sure when I used the misspelled surfaceparm in shader, it wouldn't work in game at all, but I can re-test it later today and make sure I didn't mess up something.

isRyven commented 6 years ago

Adding donotenterlarge as an alias to W_CONT_DONOTENTER_LARGE along with misspelled version would be a satisfying solution.

Aciz commented 6 years ago

I have re-tested this, and the contents flag does indeed work when the shader keyword is misspelled (surfaceparm nonotenterlarge) so I must have made a mistake at some point when testing. But regardless, I believe an alias as @isRyven suggested would be a good solution. Right now it's pretty confusing.