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
|
#include "TCastTo.hpp" // Generated file, do not modify include path
|
||||||
|
|
||||||
namespace urde {
|
namespace urde {
|
||||||
CMaterialList MakeDockMaterialList() {
|
|
||||||
CMaterialList list;
|
constexpr auto skDockMaterialList =
|
||||||
list.Add(EMaterialTypes::Trigger);
|
CMaterialList{EMaterialTypes::Trigger, EMaterialTypes::Immovable, EMaterialTypes::AIBlock};
|
||||||
list.Add(EMaterialTypes::Immovable);
|
|
||||||
list.Add(EMaterialTypes::AIBlock);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
CScriptDock::CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& position,
|
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,
|
const zeus::CVector3f& extents, s32 dock, TAreaId area, bool active, s32 dockReferenceCount,
|
||||||
bool loadConnected)
|
bool loadConnected)
|
||||||
: CPhysicsActor(uid, active, name, info, zeus::CTransform(zeus::CMatrix3f(), position), CModelData::CModelDataNull(),
|
: 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)
|
CActorParameters::None(), 0.3f, 0.1f)
|
||||||
, x258_dockReferenceCount(dockReferenceCount)
|
, x258_dockReferenceCount(dockReferenceCount)
|
||||||
, x25c_dock(dock)
|
, x25c_dock(dock)
|
||||||
|
|
Loading…
Reference in New Issue