diff --git a/src/spark_effect.cc b/src/spark_effect.cc index 79f0863..b747e3b 100644 --- a/src/spark_effect.cc +++ b/src/spark_effect.cc @@ -7,6 +7,8 @@ SparkEffect::SparkEffect(int count, float lifetime, Vector3 pos, float pos_xz_variance, float radius) : sparks(), lifetime(lifetime), timer(0.0F) { + sparks.reserve(count); + Vector3 above_pos = pos; above_pos.y += radius; for (; count > 0; --count) { diff --git a/src/spark_effect.h b/src/spark_effect.h index 3746d69..0dde24a 100644 --- a/src/spark_effect.h +++ b/src/spark_effect.h @@ -10,7 +10,7 @@ constexpr float SPARK_RADIUS = 0.03F; constexpr float SPARK_VEL_RATE = 5.0F; constexpr float SPARK_VEL_VARIANCE = 1.0F; -constexpr float SPARK_ACC_RATE = 10.0F; +constexpr float SPARK_ACC_RATE = 8.0F; class SparkEffect { public: