# HG changeset patch # User Ritor1 # Date 1370792914 -21600 # Node ID d7ba42663d59dcb3ccc49a9270e9e431f076b03c # Parent 7da06d00ad25e604e180266581eab7c4b15e0488 m diff -r 7da06d00ad25 -r d7ba42663d59 mm7_3.cpp --- a/mm7_3.cpp Sun Jun 09 21:10:32 2013 +0600 +++ b/mm7_3.cpp Sun Jun 09 21:48:34 2013 +0600 @@ -11384,30 +11384,22 @@ //----- (00440639) -------------------------------------------------------- void AddBspNodeToRenderList(unsigned int node_id) { - //int v1; // ebx@1 - signed int v2; // edi@1 - BLVSector *v3; // esi@1 - - //v1 = sector_id; - v2 = 0; - v3 = &pIndoor->pSectors[pBspRenderer->nodes[node_id].uSectorID]; + BLVSector *pSector; // esi@1 + + pSector = &pIndoor->pSectors[pBspRenderer->nodes[node_id].uSectorID]; if ( pRenderer->pRenderD3D ) { - for (uint i = 0; i < v3->uNumNonBSPFaces; ++i) + for (uint i = 0; i < pSector->uNumNonBSPFaces; ++i) //Log::Warning(L"Non-BSP face: %X", v3->pFaceIDs[v2]); - pBspRenderer->AddFaceToRenderList_d3d(node_id, v3->pFaceIDs[i]); - } - else - { - if ( v3->uNumNonBSPFaces > 0 ) - { - do - pBspRenderer->AddFaceToRenderList_sw(node_id, v3->pFaceIDs[v2++]); - while ( v2 < v3->uNumNonBSPFaces ); - } - } - if ( v3->field_0 & 0x10 ) - sub_4406BC(node_id, v3->uFirstBSPNode); + pBspRenderer->AddFaceToRenderList_d3d(node_id, pSector->pFaceIDs[i]); + } + else + { + for (uint i = 0; i < pSector->uNumNonBSPFaces; ++i) + pBspRenderer->AddFaceToRenderList_sw(node_id, pSector->pFaceIDs[i]); + } + if ( pSector->field_0 & 0x10 ) + sub_4406BC(node_id, pSector->uFirstBSPNode); } //----- (004406BC) --------------------------------------------------------