mirror of https://github.com/AxioDL/metaforce.git
CScriptDock: Make dock material list constexpr
Same behavior, no runtime overhead.
This commit is contained in:
parent
175502cb0d
commit
7fb2b6ac0b
|
@ -12,19 +12,15 @@
|
|||
#include "TCastTo.hpp" // Generated file, do not modify include path
|
||||
|
||||
namespace urde {
|
||||
CMaterialList MakeDockMaterialList() {
|
||||
CMaterialList list;
|
||||
list.Add(EMaterialTypes::Trigger);
|
||||
list.Add(EMaterialTypes::Immovable);
|
||||
list.Add(EMaterialTypes::AIBlock);
|
||||
return list;
|
||||
}
|
||||
|
||||
constexpr auto skDockMaterialList =
|
||||
CMaterialList{EMaterialTypes::Trigger, EMaterialTypes::Immovable, EMaterialTypes::AIBlock};
|
||||
|
||||
CScriptDock::CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& position,
|
||||
const zeus::CVector3f& extents, s32 dock, TAreaId area, bool active, s32 dockReferenceCount,
|
||||
bool loadConnected)
|
||||
: CPhysicsActor(uid, active, name, info, zeus::CTransform(zeus::CMatrix3f(), position), CModelData::CModelDataNull(),
|
||||
MakeDockMaterialList(), zeus::CAABox(-extents * 0.5f, extents * 0.5f), SMoverData(1.f),
|
||||
skDockMaterialList, zeus::CAABox(-extents * 0.5f, extents * 0.5f), SMoverData(1.f),
|
||||
CActorParameters::None(), 0.3f, 0.1f)
|
||||
, x258_dockReferenceCount(dockReferenceCount)
|
||||
, x25c_dock(dock)
|
||||
|
|
Loading…
Reference in New Issue