mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 11:47:42 +00:00
Various bug fixes
This commit is contained in:
@@ -254,8 +254,8 @@ void CSortedListManager::BuildNearList(rstl::reserved_vector<TUniqueId, 1024>& o
|
|||||||
mag = 8000.f;
|
mag = 8000.f;
|
||||||
zeus::CVector3f ray = dir * mag;
|
zeus::CVector3f ray = dir * mag;
|
||||||
zeus::CVector3f sum = ray + pos;
|
zeus::CVector3f sum = ray + pos;
|
||||||
zeus::CVector3f maxs(std::max(pos.z, sum.z), std::max(pos.y, sum.y), std::max(pos.x, sum.x));
|
zeus::CVector3f maxs(std::max(pos.x, sum.x), std::max(pos.y, sum.y), std::max(pos.z, sum.z));
|
||||||
zeus::CVector3f mins(std::min(sum.z, pos.z), std::min(sum.y, pos.y), std::min(sum.y, pos.y));
|
zeus::CVector3f mins(std::min(sum.x, pos.x), std::min(sum.y, pos.y), std::min(sum.z, pos.z));
|
||||||
BuildNearList(out, zeus::CAABox(mins, maxs), filter, actor);
|
BuildNearList(out, zeus::CAABox(mins, maxs), filter, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -363,10 +363,10 @@ void CHudDecoInterfaceScan::Update(float dt, const CStateManager& stateMgr)
|
|||||||
if (oldSidesPositioner != x234_sidesPositioner)
|
if (oldSidesPositioner != x234_sidesPositioner)
|
||||||
{
|
{
|
||||||
zeus::CVector3f sidesPos(x234_sidesPositioner, 0.f, 0.f);
|
zeus::CVector3f sidesPos(x234_sidesPositioner, 0.f, 0.f);
|
||||||
x24c_basewidget_leftside->SetLocalPosition(x24c_basewidget_leftside->RotateO2P(
|
x24c_basewidget_leftside->SetLocalPosition(x218_leftsidePosition +
|
||||||
x218_leftsidePosition + sidesPos));
|
x24c_basewidget_leftside->RotateO2P(sidesPos));
|
||||||
x250_basewidget_rightside->SetLocalPosition(x250_basewidget_rightside->RotateO2P(
|
x250_basewidget_rightside->SetLocalPosition(x224_rightsidePosition -
|
||||||
x224_rightsidePosition - sidesPos));
|
x250_basewidget_rightside->RotateO2P(sidesPos));
|
||||||
}
|
}
|
||||||
|
|
||||||
x244_camera->SetO2WTransform(
|
x244_camera->SetO2WTransform(
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ void CScanDisplay::ProcessInput(const CFinalInput& input)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
xc_state = EScanState::ViewingScan;
|
xc_state = EScanState::ViewingScan;
|
||||||
|
x1a4_xAlpha = 1.f;
|
||||||
CSfxManager::SfxStart(SFXui_scan_next_page, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
CSfxManager::SfxStart(SFXui_scan_next_page, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,6 +387,7 @@ void CActor::SetVolume(float vol)
|
|||||||
{
|
{
|
||||||
if (x8c_loopingSfxHandle)
|
if (x8c_loopingSfxHandle)
|
||||||
CSfxManager::UpdateEmitter(x8c_loopingSfxHandle, GetTranslation(), zeus::CVector3f::skZero, vol);
|
CSfxManager::UpdateEmitter(x8c_loopingSfxHandle, GetTranslation(), zeus::CVector3f::skZero, vol);
|
||||||
|
xd4_maxVol = vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
const zeus::CTransform CActor::GetScaledLocatorTransform(std::string_view segName) const
|
const zeus::CTransform CActor::GetScaledLocatorTransform(std::string_view segName) const
|
||||||
|
|||||||
@@ -4662,7 +4662,7 @@ void CPlayer::UpdateOrbitableObjects(CStateManager& mgr)
|
|||||||
{
|
{
|
||||||
x354_onScreenOrbitObjects.clear();
|
x354_onScreenOrbitObjects.clear();
|
||||||
x344_nearbyOrbitObjects.clear();
|
x344_nearbyOrbitObjects.clear();
|
||||||
x354_onScreenOrbitObjects.clear();
|
x364_offScreenOrbitObjects.clear();
|
||||||
|
|
||||||
if (CheckOrbitDisableSourceList(mgr))
|
if (CheckOrbitDisableSourceList(mgr))
|
||||||
return;
|
return;
|
||||||
@@ -4801,6 +4801,7 @@ TUniqueId CPlayer::FindBestOrbitableObject(const std::vector<TUniqueId>& ids,
|
|||||||
minEyeToOrbitMag = eyeToOrbitMag;
|
minEyeToOrbitMag = eyeToOrbitMag;
|
||||||
minPosInBoxMagSq = posInBoxLeft * posInBoxLeft + posInBoxTop * posInBoxTop;
|
minPosInBoxMagSq = posInBoxLeft * posInBoxLeft + posInBoxTop * posInBoxTop;
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (std::fabs(eyeToOrbitMag - minEyeToOrbitMag) <
|
if (std::fabs(eyeToOrbitMag - minEyeToOrbitMag) <
|
||||||
|
|||||||
@@ -43,13 +43,20 @@ void CScriptDock::Think(float dt, CStateManager& mgr)
|
|||||||
x268_24_dockReferenced = false;
|
x268_24_dockReferenced = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x268_26_areaPostConstructed != mgr.WorldNC()->GetArea(x260_area)->IsPostConstructed())
|
const IGameArea::Dock* gameDock = mgr.WorldNC()->GetArea(x260_area)->GetDock(x25c_dock);
|
||||||
|
TAreaId connArea = gameDock->GetConnectedAreaId(gameDock->GetReferenceCount());
|
||||||
|
if (connArea != kInvalidAreaId)
|
||||||
{
|
{
|
||||||
if (mgr.WorldNC()->GetArea(x260_area)->IsPostConstructed())
|
bool connPostConstructed = mgr.WorldNC()->GetArea(connArea)->IsPostConstructed();
|
||||||
|
if (x268_26_areaPostConstructed != connPostConstructed)
|
||||||
|
{
|
||||||
|
x268_26_areaPostConstructed = connPostConstructed;
|
||||||
|
if (connPostConstructed)
|
||||||
CEntity::SendScriptMsgs(EScriptObjectState::MaxReached, mgr, EScriptObjectMessage::None);
|
CEntity::SendScriptMsgs(EScriptObjectState::MaxReached, mgr, EScriptObjectMessage::None);
|
||||||
else
|
else
|
||||||
CEntity::SendScriptMsgs(EScriptObjectState::Zero, mgr, EScriptObjectMessage::None);
|
CEntity::SendScriptMsgs(EScriptObjectState::Zero, mgr, EScriptObjectMessage::None);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mgr.GetNextAreaId() != x260_area)
|
if (mgr.GetNextAreaId() != x260_area)
|
||||||
x264_dockState = EDockState::Three;
|
x264_dockState = EDockState::Three;
|
||||||
@@ -69,8 +76,7 @@ void CScriptDock::Think(float dt, CStateManager& mgr)
|
|||||||
mgr.SetCurrentAreaId(aid);
|
mgr.SetCurrentAreaId(aid);
|
||||||
s32 otherDock = dock->GetOtherDockNumber(dock->GetReferenceCount());
|
s32 otherDock = dock->GetOtherDockNumber(dock->GetReferenceCount());
|
||||||
|
|
||||||
CObjectList* objs = mgr.WorldNC()->GetArea(aid)->GetAreaObjects();
|
if (CObjectList* objs = mgr.WorldNC()->GetArea(aid)->GetAreaObjects())
|
||||||
if (objs)
|
|
||||||
{
|
{
|
||||||
for (CEntity* ent : *objs)
|
for (CEntity* ent : *objs)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ void CScriptDoor::Think(float dt, CStateManager& mgr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (x64_modelData->IsAnimating())
|
if (x64_modelData->IsAnimating())
|
||||||
UpdateAnimation((x64_modelData->GetAnimationDuration(s32(x260_doorState)) / x258_animLen) * dt, mgr, true);
|
UpdateAnimation((x64_modelData->GetAnimationDuration(s32(x260_doorAnimState)) / x258_animLen) * dt, mgr, true);
|
||||||
|
|
||||||
xe7_31_targetable = mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan;
|
xe7_31_targetable = mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan;
|
||||||
}
|
}
|
||||||
@@ -400,7 +400,7 @@ u32 CScriptDoor::GetDoorOpenCondition(CStateManager& mgr)
|
|||||||
/* ORIGINAL 0-00 OFFSET: 8007E9D0 */
|
/* ORIGINAL 0-00 OFFSET: 8007E9D0 */
|
||||||
void CScriptDoor::SetDoorAnimation(CScriptDoor::EDoorAnimType type)
|
void CScriptDoor::SetDoorAnimation(CScriptDoor::EDoorAnimType type)
|
||||||
{
|
{
|
||||||
x260_doorState = type;
|
x260_doorAnimState = type;
|
||||||
CModelData* modelData = x64_modelData.get();
|
CModelData* modelData = x64_modelData.get();
|
||||||
if (modelData && modelData->AnimationData())
|
if (modelData && modelData->AnimationData())
|
||||||
modelData->AnimationData()->SetAnimation(CAnimPlaybackParms(s32(type), -1, 1.f, true), false);
|
modelData->AnimationData()->SetAnimation(CAnimPlaybackParms(s32(type), -1, 1.f, true), false);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public:
|
|||||||
|
|
||||||
float x258_animLen;
|
float x258_animLen;
|
||||||
float x25c_animTime = 0.f;
|
float x25c_animTime = 0.f;
|
||||||
EDoorAnimType x260_doorState = EDoorAnimType::Open;
|
EDoorAnimType x260_doorAnimState = EDoorAnimType::Open;
|
||||||
zeus::CAABox x264_;
|
zeus::CAABox x264_;
|
||||||
TUniqueId x27c_partner1 = kInvalidUniqueId;
|
TUniqueId x27c_partner1 = kInvalidUniqueId;
|
||||||
TUniqueId x27e_partner2 = kInvalidUniqueId;
|
TUniqueId x27e_partner2 = kInvalidUniqueId;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ IGameArea::Dock::Dock(urde::CInputStream& in, const zeus::CTransform& xf)
|
|||||||
|
|
||||||
TAreaId IGameArea::Dock::GetConnectedAreaId(s32 other) const
|
TAreaId IGameArea::Dock::GetConnectedAreaId(s32 other) const
|
||||||
{
|
{
|
||||||
if (u32(other) >= x4_dockReferences.size() || other < 0)
|
if (x4_dockReferences.empty())
|
||||||
return kInvalidAreaId;
|
return kInvalidAreaId;
|
||||||
|
|
||||||
return x4_dockReferences[other].x0_area;
|
return x4_dockReferences[other].x0_area;
|
||||||
|
|||||||
2
amuse
2
amuse
Submodule amuse updated: 885a2d2154...b4c073c373
Reference in New Issue
Block a user