Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/CCmpProjectileManager.cpp
Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < m_Projectiles.size(); i++) | ||||
} | } | ||||
} | } | ||||
} | } | ||||
void CCmpProjectileManager::RenderModel(CModelAbstract& model, const CVector3D& position, SceneCollector& collector, | void CCmpProjectileManager::RenderModel(CModelAbstract& model, const CVector3D& position, SceneCollector& collector, | ||||
const CFrustum& frustum, bool culling, const CLosQuerier& los, bool losRevealAll) const | const CFrustum& frustum, bool culling, const CLosQuerier& los, bool losRevealAll) const | ||||
{ | { | ||||
// Don't display objects outside the visible area | // Don't display objects outside the visible area | ||||
ssize_t posi = (ssize_t)(0.5f + position.X / TERRAIN_TILE_SIZE); | ssize_t posi = (ssize_t)(0.5f + position.X / LOS_TILE_SIZE); | ||||
ssize_t posj = (ssize_t)(0.5f + position.Z / TERRAIN_TILE_SIZE); | ssize_t posj = (ssize_t)(0.5f + position.Z / LOS_TILE_SIZE); | ||||
if (!losRevealAll && !los.IsVisible(posi, posj)) | if (!losRevealAll && !los.IsVisible(posi, posj)) | ||||
return; | return; | ||||
model.ValidatePosition(); | model.ValidatePosition(); | ||||
if (culling && !frustum.IsBoxVisible(model.GetWorldBoundsRec())) | if (culling && !frustum.IsBoxVisible(model.GetWorldBoundsRec())) | ||||
return; | return; | ||||
Show All 23 Lines |
Wildfire Games · Phabricator