@@ -625,16 +625,18 @@ void D3DXRenderBase::r_dsgraph_render_R1_box(IRender_Sector* S, Fbox& BB, int sh
625625 lstVisuals.clear ();
626626 lstVisuals.push_back (((CSector*)S)->root ());
627627
628- for (auto &it : lstVisuals)
628+ for (size_t test = 0 ; test < lstVisuals. size (); ++test )
629629 {
630+ dxRender_Visual* V = lstVisuals[test];
631+
630632 // Visual is 100% visible - simply add it
631- switch (it ->Type )
633+ switch (V ->Type )
632634 {
633635 case MT_HIERRARHY:
634636 {
635637 // Add all children
636- FHierrarhyVisual* pV = (FHierrarhyVisual*)it ;
637- for (auto & i : pV->children )
638+ FHierrarhyVisual* pV = (FHierrarhyVisual*)V ;
639+ for (auto & i : pV->children )
638640 {
639641 dxRender_Visual* T = i;
640642 if (BB.intersect (T->vis .box ))
@@ -646,9 +648,9 @@ void D3DXRenderBase::r_dsgraph_render_R1_box(IRender_Sector* S, Fbox& BB, int sh
646648 case MT_SKELETON_RIGID:
647649 {
648650 // Add all children (s)
649- CKinematics* pV = (CKinematics*)it ;
651+ CKinematics* pV = (CKinematics*)V ;
650652 pV->CalculateBones (TRUE );
651- for (auto & i : pV->children )
653+ for (auto & i : pV->children )
652654 {
653655 dxRender_Visual* T = i;
654656 if (BB.intersect (T->vis .box ))
@@ -658,8 +660,8 @@ void D3DXRenderBase::r_dsgraph_render_R1_box(IRender_Sector* S, Fbox& BB, int sh
658660 break ;
659661 case MT_LOD:
660662 {
661- FLOD* pV = (FLOD*)it ;
662- for (auto & i : pV->children )
663+ FLOD* pV = (FLOD*)V ;
664+ for (auto & i : pV->children )
663665 {
664666 dxRender_Visual* T = i;
665667 if (BB.intersect (T->vis .box ))
@@ -670,13 +672,13 @@ void D3DXRenderBase::r_dsgraph_render_R1_box(IRender_Sector* S, Fbox& BB, int sh
670672 default :
671673 {
672674 // Renderable visual
673- ShaderElement* E2 = it ->shader ->E [sh]._get ();
675+ ShaderElement* E2 = V ->shader ->E [sh]._get ();
674676 if (E2 && !(E2 ->flags .bDistort ))
675677 {
676678 for (u32 pass = 0 ; pass < E2 ->passes .size (); pass++)
677679 {
678680 RCache.set_Element (E2 , pass);
679- it ->Render (-1 .f );
681+ V ->Render (-1 .f );
680682 }
681683 }
682684 }
0 commit comments