mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 15:07:41 +00:00
Various imps
This commit is contained in:
34
Runtime/World/CScriptDamageableTrigger.cpp
Normal file
34
Runtime/World/CScriptDamageableTrigger.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "CScriptDamageableTrigger.hpp"
|
||||
#include "CActorParameters.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
CActorParameters MakeDamageableTriggerActorParms(const CActorParameters& aParams, const CVisorParameters& vParams)
|
||||
{
|
||||
CActorParameters ret = aParams;
|
||||
ret.SetVisorParameters(vParams);
|
||||
return ret;
|
||||
}
|
||||
|
||||
CMaterialList MakeDamageableTriggerMaterial(CScriptDamageableTrigger::ECanOrbit canOrbit)
|
||||
{
|
||||
if (canOrbit == CScriptDamageableTrigger::ECanOrbit::Orbit)
|
||||
return CMaterialList(EMaterialTypes::FourtyOne, EMaterialTypes::ThirtyFour, EMaterialTypes::FourtyThree,
|
||||
EMaterialTypes::Fifty, EMaterialTypes::FiftySix);
|
||||
return CMaterialList(EMaterialTypes::ThirtyFour, EMaterialTypes::FourtyThree,
|
||||
EMaterialTypes::Fifty, EMaterialTypes::FiftySix);
|
||||
}
|
||||
|
||||
|
||||
CScriptDamageableTrigger::CScriptDamageableTrigger(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CVector3f& position, const zeus::CVector3f& extent, const CHealthInfo&,
|
||||
const CDamageVulnerability&, u32, ResId, ResId, ResId,
|
||||
CScriptDamageableTrigger::ECanOrbit canOrbit, bool active, const CVisorParameters& vParams)
|
||||
: CActor(uid, active, name, info, zeus::CTransform::Translate(position), CModelData::CModelDataNull(),
|
||||
MakeDamageableTriggerMaterial(canOrbit), MakeDamageableTriggerActorParms(CActorParameters::None(), vParams),
|
||||
kInvalidUniqueId),
|
||||
x14c_bounds(-extent * 0.5f, extent * 0.5f)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user