CDarrow / DXX-Retro

A source port of Descent 1 and 2, focused on quality competitive play. Uncompromising commitment to original gameplay (except where the original sucked). Based on the Rebirth project.
Other
50 stars 16 forks source link

Fix observer render attempt past childless sides #137

Open arbruijn opened 1 year ago

roncli commented 1 year ago

My understanding of C is entry level, but I will ask this anyway. :) Is this check happening in the right spot?

if ( (window_check || !visited[ch]) && ((wid & WID_RENDPAST_FLAG) || (observer && ch >= 0)) ) {

If ch can be less than 0 at this point, then !visited[ch] could potentially fail, even with this check.

arbruijn commented 1 year ago

That's right, but window_check is always 1 so I didn't bother to change it. I can add the check for visited as well if you prefer.

roncli commented 1 year ago

Huh. Those are really weird statements that define window_check and some others... But that's neither here nor there, I would definitely add the check just in case someone somewhere down the line wants window_check to be 0.