Quake3 bsp question (not really openGL question)

I’ve got a program working to view .bsp files from quake3 which uses OpenGL, but now I’m trying to add collisions and I’ve run into a problem.

I looked at all the planes in a leaf and tried to perform collisions but realized that I was missing some of the planes. So then I also started grabbing the
dividing plane of the last valid node before hitting the leaf. The problem now is that I sometimes hit walls where there are none since all dividing planes
in the node aren’t really walls. I don’t think there is a way to determine if the dividing plane is a wall or not.

Basically I don’t get why all the planes I need aren’t in the leaf’s brush plane listing and why I need to use the node’s dividing plane to get some of the needed planes.
Is there a better way to do this? If there isn’t how do I figure out if the node’s dividing plane is supposed to be a wall or not.

(When I use the word wall I’m refering to any brush side I should collide with.)

Thanks

You shouldn’t think of the planes as the colliding structure per se’ but rather the brushes. The quake3 bsp is a leafy solid bsp. So all you have to do is calculate where the player would be moved to. If the destination is into some brush, then you check the contents of the brush to see if it is really solid or not. Actually you should probably trace a line from where the player is at in the previous frame to where the player would be if no brushes were solid. And test the brush this line segment first intersects, if any. If the first intersected brush is solid then you clip the line to the intersection (you may also want to then slide along the brush by projecting the velocity into the intersecting plane of the intersected brush).