[Maps] Ignore cull distance for frustum calculation

This commit is contained in:
momo5502 2017-04-07 22:07:44 +02:00
parent 2df233d694
commit 0e56b345d8

View File

@ -777,8 +777,6 @@ namespace Components
float* _origin = gameWorld->dpvs.smodelDrawInsts[i].placement.origin; float* _origin = gameWorld->dpvs.smodelDrawInsts[i].placement.origin;
glm::vec2 modelOrigin(_origin[0], _origin[1]); glm::vec2 modelOrigin(_origin[0], _origin[1]);
if ((selfOrigin - modelOrigin).length() <= gameWorld->dpvs.smodelDrawInsts[i].cullDist * 1.0f)
{
// If matrix is singular just draw the models // If matrix is singular just draw the models
glm::mat2x2 matrix(right[0], -(forward[0]), right[1], -(forward[1])); glm::mat2x2 matrix(right[0], -(forward[0]), right[1], -(forward[1]));
if (glm::determinant(matrix) != 0) if (glm::determinant(matrix) != 0)
@ -796,7 +794,6 @@ namespace Components
gameWorld->dpvs.smodelVisData[1][i] = 1; gameWorld->dpvs.smodelVisData[1][i] = 1;
gameWorld->dpvs.smodelVisData[2][i] = 1; gameWorld->dpvs.smodelVisData[2][i] = 1;
} }
}
}, HOOK_CALL).install()->quick(); }, HOOK_CALL).install()->quick();
Dvar::OnInit([]() Dvar::OnInit([]()