@@ -333,8 +333,8 @@ extern float r_ssaHZBvsTEX;
333333
334334ICF bool pred_sp_sort (ISpatial* _1, ISpatial* _2)
335335{
336- float d1 = _1->spatial .sphere .P .distance_to_sqr (Device.vCameraPosition );
337- float d2 = _2->spatial .sphere .P .distance_to_sqr (Device.vCameraPosition );
336+ float d1 = _1->GetSpatialData () .sphere .P .distance_to_sqr (Device.vCameraPosition );
337+ float d2 = _2->GetSpatialData () .sphere .P .distance_to_sqr (Device.vCameraPosition );
338338 return d1<d2;
339339}
340340
@@ -454,20 +454,20 @@ void CRender::Calculate ()
454454 for (u32 o_it=0 ; o_it<lstRenderables.size (); o_it++)
455455 {
456456 ISpatial* spatial = lstRenderables[o_it]; spatial->spatial_updatesector ();
457- CSector* sector = (CSector*)spatial->spatial .sector ;
457+ CSector* sector = (CSector*)spatial->GetSpatialData () .sector ;
458458 if (0 ==sector)
459459 continue ; // disassociated from S/P structure
460460
461461 // Filter only not light spatial
462- if (PortalTraverser.i_marker != sector->r_marker && (spatial->spatial .type & STYPE_RENDERABLE) ) continue ; // inactive (untouched) sector
462+ if (PortalTraverser.i_marker != sector->r_marker && (spatial->GetSpatialData () .type & STYPE_RENDERABLE) ) continue ; // inactive (untouched) sector
463463
464- if (spatial->spatial .type & STYPE_RENDERABLE)
464+ if (spatial->GetSpatialData () .type & STYPE_RENDERABLE)
465465 {
466466 for (u32 v_it=0 ; v_it<sector->r_frustums .size (); v_it++)
467467 {
468468 set_Frustum (&(sector->r_frustums [v_it]));
469469
470- if (!View->testSphere_dirty (spatial->spatial .sphere .P ,spatial->spatial .sphere .R ) /* && (spatial->spatial.type & STYPE_RENDERABLE)*/ ) continue ;
470+ if (!View->testSphere_dirty (spatial->GetSpatialData () .sphere .P ,spatial->GetSpatialData () .sphere .R ) /* && (spatial->spatial.type & STYPE_RENDERABLE)*/ ) continue ;
471471 // renderable
472472 IRenderable* renderable = spatial->dcast_Renderable ();
473473 if (0 ==renderable) {
@@ -508,9 +508,9 @@ void CRender::Calculate ()
508508 }
509509 else
510510 {
511- if ( ViewBase.testSphere_dirty (spatial->spatial .sphere .P ,spatial->spatial .sphere .R ) )
511+ if ( ViewBase.testSphere_dirty (spatial->GetSpatialData () .sphere .P ,spatial->GetSpatialData () .sphere .R ) )
512512 {
513- VERIFY (spatial->spatial .type & STYPE_LIGHTSOURCE);
513+ VERIFY (spatial->GetSpatialData () .type & STYPE_LIGHTSOURCE);
514514 // lightsource
515515 light* L = (light*) spatial->dcast_Light ();
516516 VERIFY (L);
0 commit comments