As far as I know, in the GoldSource engine (based on Quake and very similar in these kinds of aspects I imagine) the maps have collision information compiled in in form usable by a line tracing algorithm. There are three collision models for a map for three different "hull sizes" - point, ducking player and standing player. Unfortunately the format it's stored in, while being really good for line tracing, isn't visualizable or even convertible back to viewable forms. You can also encounter
map compile bugs (having collision in the air in this particular spot).
There is an array of entities over
here, in a
global variable.
Now on to the strafing. It's not very hard to write the player movement code as formulas and derive the angles for optimal strafing from them.
We did it a bunch of times for GoldSource, this should be applicable to Quake for the most part except some changes in the order of execution, and maybe friction functions.
Here's the maths if you're curious. The actual movement code is
around this file.
The thing about the PC version is that after calculating the perfect angle you can just set the player angle. As far as I understand on the console you can only rotate the camera a fixed angle difference per frame? Not sure how this would work for that, and it's likely the solution would be different under this constraint (for example strafing before the optimal angle is reached because doing so will waste the speed, but save the camera rotation frames so it might pay off).