mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 22:27:43 +00:00
CScriptAreaAttributes imps, update hecl
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#include "CScriptAreaAttributes.hpp"
|
||||
#include "CEnvFxManager.hpp"
|
||||
#include "CStateManager.hpp"
|
||||
#include "CWorld.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -18,4 +21,47 @@ CScriptAreaAttributes::CScriptAreaAttributes(TUniqueId uid, const CEntityInfo& i
|
||||
{
|
||||
}
|
||||
|
||||
void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr)
|
||||
{
|
||||
AcceptScriptMsg(msg, objId, stateMgr);
|
||||
if (x4_areaId == kInvalidAreaId)
|
||||
return;
|
||||
|
||||
if (msg == EScriptObjectMessage::InternalMessage13)
|
||||
{
|
||||
CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId);
|
||||
area->SetAreaAttributes(this);
|
||||
stateMgr.GetEnvFxManager()->SetFxDensity(500, x3c_envFxDensity);
|
||||
}
|
||||
else if (msg >= EScriptObjectMessage::InternalMessage12)
|
||||
{
|
||||
CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId);
|
||||
|
||||
if (!area->IsPostConstructed())
|
||||
return;
|
||||
|
||||
area->SetAreaAttributes(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
bool CScriptAreaAttributes::GetNeedsSky() const
|
||||
{
|
||||
return x34_24_showSkybox;
|
||||
}
|
||||
|
||||
bool CScriptAreaAttributes::GetNeedsEnvFx() const
|
||||
{
|
||||
return x38_envFx != EEnvFxType::None;
|
||||
}
|
||||
|
||||
float CScriptAreaAttributes::GetThermalHeat() const
|
||||
{
|
||||
return x40_thermalHeat;
|
||||
}
|
||||
|
||||
float CScriptAreaAttributes::GetWorldLightingLevel() const
|
||||
{
|
||||
return x48_worldLightingLevel;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user