2019-12-22 20:04:07 +00:00
|
|
|
#include "Runtime/World/CScriptPointOfInterest.hpp"
|
|
|
|
|
|
|
|
#include "Runtime/CPlayerState.hpp"
|
|
|
|
#include "Runtime/CStateManager.hpp"
|
|
|
|
#include "Runtime/World/CActorParameters.hpp"
|
|
|
|
|
2019-09-21 13:07:13 +00:00
|
|
|
#include "TCastTo.hpp" // Generated file, do not modify include path
|
2016-12-10 02:35:20 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2016-12-10 02:35:20 +00:00
|
|
|
|
2019-09-06 14:49:51 +00:00
|
|
|
CScriptPointOfInterest::CScriptPointOfInterest(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
2016-12-10 02:35:20 +00:00
|
|
|
const zeus::CTransform& xf, bool active,
|
|
|
|
const CScannableParameters& parms, float f1)
|
2016-12-29 21:38:59 +00:00
|
|
|
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(u64(EMaterialTypes::Orbit)),
|
2016-12-10 02:35:20 +00:00
|
|
|
CActorParameters::None().Scannable(parms), kInvalidUniqueId)
|
2018-12-08 05:30:43 +00:00
|
|
|
, xe8_pointSize(f1) {}
|
2016-12-10 02:35:20 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptPointOfInterest::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
2017-01-15 03:07:01 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptPointOfInterest::Think(float dt, CStateManager& mgr) {
|
|
|
|
xe7_31_targetable = mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan;
|
|
|
|
CEntity::Think(dt, mgr);
|
2016-12-10 02:35:20 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptPointOfInterest::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
|
|
|
|
CActor::AcceptScriptMsg(msg, uid, mgr);
|
2016-12-10 02:35:20 +00:00
|
|
|
}
|
|
|
|
|
2020-04-05 11:54:02 +00:00
|
|
|
void CScriptPointOfInterest::AddToRenderer(const zeus::CFrustum&, CStateManager&) {}
|
2016-12-10 02:35:20 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptPointOfInterest::Render(const CStateManager&) const {}
|
2016-12-10 02:35:20 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptPointOfInterest::CalculateRenderBounds() {
|
|
|
|
if (xe8_pointSize == 0.f)
|
|
|
|
CActor::CalculateRenderBounds();
|
|
|
|
else
|
|
|
|
x9c_renderBounds = zeus::CAABox(x34_transform.origin - xe8_pointSize, x34_transform.origin + xe8_pointSize);
|
2016-12-10 02:35:20 +00:00
|
|
|
}
|
|
|
|
|
2019-06-12 02:05:17 +00:00
|
|
|
std::optional<zeus::CAABox> CScriptPointOfInterest::GetTouchBounds() const {
|
2018-12-08 05:30:43 +00:00
|
|
|
return {zeus::CAABox{x34_transform.origin, x34_transform.origin}};
|
2016-12-10 02:35:20 +00:00
|
|
|
}
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|