mirror of https://github.com/AxioDL/metaforce.git
Don't recreate the nearList for each entity
This commit is contained in:
parent
cefe6bb232
commit
483e25bff3
|
@ -2344,6 +2344,7 @@ void CStateManager::MoveActors(float dt) {
|
||||||
|
|
||||||
void CStateManager::CrossTouchActors() {
|
void CStateManager::CrossTouchActors() {
|
||||||
std::array<bool, 1024> visits{};
|
std::array<bool, 1024> visits{};
|
||||||
|
rstl::reserved_vector<TUniqueId, 1024> nearList;
|
||||||
|
|
||||||
for (CEntity* ent : GetActorObjectList()) {
|
for (CEntity* ent : GetActorObjectList()) {
|
||||||
if (ent == nullptr) {
|
if (ent == nullptr) {
|
||||||
|
@ -2365,7 +2366,7 @@ void CStateManager::CrossTouchActors() {
|
||||||
filter = CMaterialFilter::MakeExclude(EMaterialTypes::Trigger);
|
filter = CMaterialFilter::MakeExclude(EMaterialTypes::Trigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
rstl::reserved_vector<TUniqueId, 1024> nearList;
|
nearList.clear();
|
||||||
BuildNearList(nearList, *touchAABB, filter, &actor);
|
BuildNearList(nearList, *touchAABB, filter, &actor);
|
||||||
|
|
||||||
for (const auto& id : nearList) {
|
for (const auto& id : nearList) {
|
||||||
|
|
Loading…
Reference in New Issue