2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 18:27:41 +00:00

CWeaponMode: Make constexpr capable

Given this is such a simple type, this can be made usable with
constexpr. This allows the type to be usable at file-scope without
potentially incurring a runtime constructor.
This commit is contained in:
Lioncash
2020-01-23 23:02:42 -05:00
parent 7b89a165bf
commit 3d5ed90d1a
2 changed files with 16 additions and 20 deletions

View File

@@ -207,7 +207,7 @@ std::optional<zeus::CAABox> CScriptTrigger::GetTouchBounds() const {
return {GetTriggerBoundsWR()};
return {};
}
static const CWeaponMode sktonOHurtWeaponMode = CWeaponMode(EWeaponType::Power, false, false, true);
constexpr auto sktonOHurtWeaponMode = CWeaponMode(EWeaponType::Power, false, false, true);
void CScriptTrigger::Touch(CActor& act, CStateManager& mgr) {
if (!act.GetActive() || act.GetMaterialList().HasMaterial(EMaterialTypes::Trigger))