dx = rt->bounds[1][0] - rt->bounds[0][0];
dy = rt->bounds[1][1] - rt->bounds[0][1];
- l = fmaxf( dx, dy );
- d = l * ( l / dx ) * .5f;
+ l = fmaxf( dx, dy ) * .5f;
cx = (rt->bounds[1][0] + rt->bounds[0][0]) * .5f;
cy = (rt->bounds[1][1] + rt->bounds[0][1]) * .5f;
- rt->bounds[0][0] = cx - d - padding;
- rt->bounds[1][0] = cx + d + padding;
- rt->bounds[0][1] = cy - d - padding;
- rt->bounds[1][1] = cy + d + padding;
+ rt->bounds[0][0] = cx - l - padding;
+ rt->bounds[1][0] = cx + l + padding;
+ rt->bounds[0][1] = cy - l - padding;
+ rt->bounds[1][1] = cy + l + padding;
- rt->scale = d + padding;
+ rt->scale = l + padding;
csr_update_subsamples( rt );
}
m4x3f transform = M4X3_IDENTITY;
vmf_solid solid;
vmf_vert tri[3];
- vdf_node *ent_solid;
boxf trf_bounds;
u32 group_id = 0;
else
{
// Brush entity
- if( (ent_solid = vdf_next( ent, "solid", NULL )) )
+ vdf_foreach( ent, "solid", ent_solid )
{
solidgen_push( &solid, ent_solid );
}