CSnakeWeedSwarm: Use emplace_back in CreateBoid()

Same behavior, but with in-place construction instead.
This commit is contained in:
Lioncash 2020-03-26 01:00:26 -04:00
parent 2164854e87
commit 43e0d16c5d
1 changed files with 2 additions and 2 deletions

View File

@ -341,8 +341,8 @@ bool CSnakeWeedSwarm::CreateBoid(const zeus::CVector3f& vec, CStateManager& mgr)
const auto& result = mgr.RayStaticIntersection(pos, zeus::skDown, 2.f * xf8_height, skMaterialFilter);
if (result.IsValid() && result.GetPlane().normal().dot(zeus::skUp) > x11c_) {
const auto& boidPosition = result.GetPoint() - zeus::CVector3f(0.f, 0.f, x128_distanceBelowGround);
x134_boids.push_back({boidPosition, x110_maxZOffset, x114_speed + x118_speedVariation,
(x124_scaleMax - x120_scaleMin) * mgr.GetActiveRandom()->Float() + x120_scaleMin});
x134_boids.emplace_back(boidPosition, x110_maxZOffset, x114_speed + x118_speedVariation,
(x124_scaleMax - x120_scaleMin) * mgr.GetActiveRandom()->Float() + x120_scaleMin);
return true;
}
return false;