Open Aciz opened 2 years ago
Does ETL support func_fakebrush in mapscripts too? Would be nice to see those too. Edit: now possible with https://github.com/etlegacy/etlegacy/pull/2194
And the mins and maxs for TOIs too, but I guess I'm pushing it too far.
I don't think it can unless they are in the bsp for the purpose of rendering these. As map scripts loads entities etc later.
I've ported over clip/trigger/slick drawing from oDFe to ET:Legacy. The current implementation is working as following:
r_drawClips
- toggle clip brush drawing, including both playerclips and weaponclipsr_drawClipsShader
- sets shader to use for drawing clip brushesr_drawTriggers
- toggle trigger brush drawingr_drawTriggersShader
- sets shader to use for drawing trigger brushesr_drawSlicks
- toggle slick surface drawing, includes bothsurfaceparm slick
and any surface that's too steep to walk on (excluding fully vertical surfaces or surfaces withnormal[2] < 0
r_drawSlicksShader
- sets shader to use for drawing slick surfacesI've put the code up in a branch over at my fork here: https://github.com/Aciz/etlegacy/tree/clip-trigger-slick-drawing
We've had some discussions about this feature in the past, and while something like this might seem very odd, it is an extremely valuable tool for mappers. It can be used to easily spot areas which are badly clipped for example, or quickly see if you've made some surfaces too steep. However the implementation is not currently something I'd consider "production ready" as it as some issues.
Firstly, this is not aware of PVS. It is drawing every single clip/trigger/slick in the map, even if the surfaces are not currently in your PVS. This is because it's initialized in
CL_CM_LoadMap
, so it's just using the collision model to "detect" things.Which leads to the second problem...
It's not aware of gamestate. Anything that's being adjusted in runtime displays incorrectly. For example, clipping for constructible objectives is always drawn, regardless of the state of the objective. Again, this is because of the initialization happening in
CL_CM_LoadMap
, it has no idea what's happening in game code.Third issue is that the current limits for
r_maxPolys
andr_maxPolyVerts
are too low for this, however I believe they should be fine once the PVS issue is fixed.Once these issues are fixed, we could perhaps consider adding this to the engine. I however don't really know how to even begin fixing these issues, which is why I'm creating a ticket for this, so maybe someone else can take a look and try to fix these issues.