2017-09-18 03:02:48 +00:00
|
|
|
#include "CScriptSpiderBallAttractionSurface.hpp"
|
|
|
|
#include "CActorParameters.hpp"
|
|
|
|
#include "TCastTo.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
CScriptSpiderBallAttractionSurface::CScriptSpiderBallAttractionSurface(
|
2017-11-13 06:19:18 +00:00
|
|
|
TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
2017-09-18 03:02:48 +00:00
|
|
|
const zeus::CTransform& xf, const zeus::CVector3f& scale, bool active)
|
2017-12-19 03:05:50 +00:00
|
|
|
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), {EMaterialTypes::NoStepLogic},
|
2017-09-18 03:02:48 +00:00
|
|
|
CActorParameters::None(), kInvalidUniqueId), xe8_scale(scale),
|
|
|
|
xf4_aabb(zeus::CAABox(scale * -0.5f, scale * 0.5f).getTransformedAABox(xf.getRotation()))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptSpiderBallAttractionSurface::Accept(IVisitor& visitor)
|
|
|
|
{
|
|
|
|
visitor.Visit(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptSpiderBallAttractionSurface::Think(float dt, CStateManager& mgr)
|
|
|
|
{
|
|
|
|
// Empty
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptSpiderBallAttractionSurface::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr)
|
|
|
|
{
|
|
|
|
CActor::AcceptScriptMsg(msg, sender, mgr);
|
|
|
|
}
|
|
|
|
|
|
|
|
rstl::optional_object<zeus::CAABox> CScriptSpiderBallAttractionSurface::GetTouchBounds() const
|
|
|
|
{
|
|
|
|
if (GetActive())
|
|
|
|
return {zeus::CAABox(xf4_aabb.min + GetTranslation(), xf4_aabb.max + GetTranslation())};
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptSpiderBallAttractionSurface::Touch(CActor& actor, CStateManager& mgr)
|
|
|
|
{
|
|
|
|
// Empty
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|