2017-09-18 03:02:48 +00:00
|
|
|
#include "CScriptSpiderBallAttractionSurface.hpp"
|
|
|
|
#include "CActorParameters.hpp"
|
2019-09-21 13:07:13 +00:00
|
|
|
#include "TCastTo.hpp" // Generated file, do not modify include path
|
2017-09-18 03:02:48 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-09-18 03:02:48 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CScriptSpiderBallAttractionSurface::CScriptSpiderBallAttractionSurface(TUniqueId uid, std::string_view name,
|
|
|
|
const CEntityInfo& info,
|
|
|
|
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},
|
2018-12-08 05:30:43 +00:00
|
|
|
CActorParameters::None(), kInvalidUniqueId)
|
|
|
|
, xe8_scale(scale)
|
|
|
|
, xf4_aabb(zeus::CAABox(scale * -0.5f, scale * 0.5f).getTransformedAABox(xf.getRotation())) {}
|
2017-09-18 03:02:48 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptSpiderBallAttractionSurface::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
2017-09-18 03:02:48 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptSpiderBallAttractionSurface::Think(float dt, CStateManager& mgr) {
|
|
|
|
// Empty
|
2017-09-18 03:02:48 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptSpiderBallAttractionSurface::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender,
|
|
|
|
CStateManager& mgr) {
|
|
|
|
CActor::AcceptScriptMsg(msg, sender, mgr);
|
2017-09-18 03:02:48 +00:00
|
|
|
}
|
|
|
|
|
2019-06-12 02:05:17 +00:00
|
|
|
std::optional<zeus::CAABox> CScriptSpiderBallAttractionSurface::GetTouchBounds() const {
|
2018-12-08 05:30:43 +00:00
|
|
|
if (GetActive())
|
|
|
|
return {zeus::CAABox(xf4_aabb.min + GetTranslation(), xf4_aabb.max + GetTranslation())};
|
|
|
|
return {};
|
2017-09-18 03:02:48 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptSpiderBallAttractionSurface::Touch(CActor& actor, CStateManager& mgr) {
|
|
|
|
// Empty
|
2017-09-18 03:02:48 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|