2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-12 09:26:09 +00:00

CDamageInfo: Make certain constructors constexpr

Allows eliminating potential runtime static constructors by allowing
file-scope instances to be declared constexpr.
This commit is contained in:
Lioncash
2020-01-31 01:48:04 -05:00
parent 918f1a9fcb
commit 495ff19aad
6 changed files with 14 additions and 9 deletions

View File

@@ -2045,7 +2045,7 @@ float CMorphBall::ComputeMaxSpeed() const {
return g_tweakBall->GetBallTranslationMaxSpeed(int(x0_player.GetSurfaceRestraint()));
}
static const CDamageInfo kBallDamage = {CWeaponMode(EWeaponType::BoostBall), 50000.f, 0.f, 0.f};
constexpr CDamageInfo kBallDamage = {CWeaponMode(EWeaponType::BoostBall), 50000.f, 0.f, 0.f};
void CMorphBall::Touch(CActor& actor, CStateManager& mgr) {
if (TCastToPtr<CPhysicsActor> act = actor) {