mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 09:47:43 +00:00
More gun implementations, and script objects
This commit is contained in:
49
Runtime/World/CScriptPointOfInterest.cpp
Normal file
49
Runtime/World/CScriptPointOfInterest.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
#include "CScriptPointOfInterest.hpp"
|
||||
#include "CActorParameters.hpp"
|
||||
#include "CStateManager.hpp"
|
||||
#include "CPlayerState.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CScriptPointOfInterest::CScriptPointOfInterest(TUniqueId uid, const std::string& name, const CEntityInfo info,
|
||||
const zeus::CTransform& xf, bool active,
|
||||
const CScannableParameters& parms, float f1)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(u64(EMaterialTypes::FourtyOne)),
|
||||
CActorParameters::None().Scannable(parms), kInvalidUniqueId)
|
||||
, xe8_pointSize(f1)
|
||||
{
|
||||
}
|
||||
|
||||
void CScriptPointOfInterest::Think(float dt, CStateManager& mgr)
|
||||
{
|
||||
xe7_31_ = mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan;
|
||||
CEntity::Think(dt, mgr);
|
||||
}
|
||||
|
||||
void CScriptPointOfInterest::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr)
|
||||
{
|
||||
CActor::AcceptScriptMsg(msg, uid, mgr);
|
||||
}
|
||||
|
||||
void CScriptPointOfInterest::AddToRenderer(const zeus::CFrustum&, const CStateManager&) const
|
||||
{
|
||||
}
|
||||
|
||||
void CScriptPointOfInterest::Render(const CStateManager&) const
|
||||
{
|
||||
}
|
||||
|
||||
void CScriptPointOfInterest::CalculateRenderBounds()
|
||||
{
|
||||
if (xe8_pointSize == 0.f)
|
||||
CActor::CalculateRenderBounds();
|
||||
else
|
||||
x9c_aabox = zeus::CAABox(x34_transform.origin - xe8_pointSize, x34_transform.origin + xe8_pointSize);
|
||||
}
|
||||
|
||||
rstl::optional_object<zeus::CAABox> CScriptPointOfInterest::GetTouchBounds() const
|
||||
{
|
||||
return {zeus::CAABox{x34_transform.origin, x34_transform.origin}};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user