Skip to content

Commit

Permalink
Cleaned up some redundant/unused code in xr_object_list
Browse files Browse the repository at this point in the history
  • Loading branch information
yohjimane committed Dec 20, 2024
1 parent 9e4a07d commit d5dd287
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions src/xrEngine/xr_object_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,37 +254,18 @@ void CObjectList::Update(bool bForce)
#endif

stats.Crows = m_primary_crows.size();
Objects* workload;
if (!psDeviceFlags.test(rsDisableObjectsAsCrows))
workload = &m_primary_crows;
else
{
workload = &objects_active;
clear_crow_vec(m_primary_crows);
}

stats.Update.Begin();
stats.Active = objects_active.size();
stats.Total = objects_active.size() + objects_sleeping.size();

u32 const objects_count = workload->size();
IGameObject** objects = (IGameObject**)xr_alloca(objects_count * sizeof(IGameObject*));
std::copy(workload->begin(), workload->end(), objects);

m_primary_crows.clear();

IGameObject** b = objects;
IGameObject** e = objects + objects_count;
for (IGameObject** i = b; i != e; ++i)
{
(*i)->IAmNotACrowAnyMore();
(*i)->SetCrowUpdateFrame(u32(-1));
}

for (IGameObject** i = b; i != e; ++i)
for (auto& object : objects_active)
{
(*i)->PreUpdateCL();
SingleUpdate(*i);
object->IAmNotACrowAnyMore();
object->SetCrowUpdateFrame(u32(-1));
object->PreUpdateCL();
SingleUpdate(object);
}

//--#SM+#-- PostUpdateCL для всех клиентских объектов [for crowed and non-crowed]
Expand Down

0 comments on commit d5dd287

Please sign in to comment.