metaforce/Runtime/World/CPatterned.cpp

37 lines
1.7 KiB
C++
Raw Normal View History

2016-04-25 05:03:38 +00:00
#include "CPatterned.hpp"
#include "CPatternedInfo.hpp"
#include "TCastTo.hpp"
2017-08-25 06:18:09 +00:00
#include "CActorParameters.hpp"
2016-04-25 05:03:38 +00:00
namespace urde
{
2016-12-29 21:38:59 +00:00
CMaterialList gkPatternedGroundMaterialList(EMaterialTypes::Character, EMaterialTypes::Solid,
EMaterialTypes::Orbit, EMaterialTypes::GroundCollider,
EMaterialTypes::Target);
CMaterialList gkPatternedFlyerMaterialList(EMaterialTypes::Character, EMaterialTypes::Solid,
EMaterialTypes::Orbit, EMaterialTypes::Target);
2016-04-25 05:03:38 +00:00
2017-11-13 06:19:18 +00:00
CPatterned::CPatterned(ECharacter character, TUniqueId uid, std::string_view name, CPatterned::EFlavorType flavor,
2016-04-25 05:46:28 +00:00
const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData,
const CPatternedInfo& pInfo, CPatterned::EMovementType moveType, CPatterned::EColliderType,
EBodyType, const CActorParameters& actorParms, int variant)
: CAi(uid, pInfo.xf8_active, name, info, xf, std::move(mData),
zeus::CAABox(pInfo.xcc_bodyOrigin - zeus::CVector3f{pInfo.xc4_halfExtent, pInfo.xc4_halfExtent, 0.f},
pInfo.xcc_bodyOrigin +
zeus::CVector3f{pInfo.xc4_halfExtent, pInfo.xc4_halfExtent, pInfo.xc8_height}),
pInfo.x0_mass, pInfo.x54_healthInfo, pInfo.x5c_damageVulnerability,
moveType == EMovementType::Flyer ? gkPatternedFlyerMaterialList : gkPatternedGroundMaterialList,
2017-06-12 04:23:34 +00:00
pInfo.xfc_stateMachineId, actorParms, pInfo.xd8_stepUpHeight, 0.8f),
x34c_character(character)
2016-04-25 05:03:38 +00:00
{
2017-08-25 06:18:09 +00:00
x400_25_ = true;
x400_31_ = moveType == CPatterned::EMovementType::Flyer;
x402_29_ = true;
x402_30_ = x402_31_ = actorParms.HasThermalHeat();
x403_25_ = true;
x403_26_ = true;
2016-04-25 05:03:38 +00:00
}
2016-04-25 05:03:38 +00:00
}