mirror of https://github.com/AxioDL/metaforce.git
Fix disappearing actor issue
This commit is contained in:
parent
055de86170
commit
017185109f
|
@ -36,9 +36,9 @@ void CObjectList::RemoveObject(TUniqueId uid)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
x0_list[ent.prev].next = ent.next;
|
||||||
if (ent.next != -1)
|
if (ent.next != -1)
|
||||||
x0_list[ent.next].prev = -1;
|
x0_list[ent.next].prev = ent.prev;
|
||||||
x0_list[ent.prev].next = -1;
|
|
||||||
}
|
}
|
||||||
ent.entity = nullptr;
|
ent.entity = nullptr;
|
||||||
ent.next = -1;
|
ent.next = -1;
|
||||||
|
|
|
@ -747,7 +747,7 @@ void CStateManager::DrawWorld() const
|
||||||
bool isVisArea = area.x4_selfIdx == visAreaId;
|
bool isVisArea = area.x4_selfIdx == visAreaId;
|
||||||
SetupFogForArea(area);
|
SetupFogForArea(area);
|
||||||
g_Renderer->SetWorldLightFadeLevel(area.GetPostConstructed()->x1128_worldLightingLevel);
|
g_Renderer->SetWorldLightFadeLevel(area.GetPostConstructed()->x1128_worldLightingLevel);
|
||||||
for (CEntity* ent : *area.GetPostConstructed()->x10c0_areaObjs)
|
for (CEntity* ent : *area.GetAreaObjects())
|
||||||
{
|
{
|
||||||
if (TCastToPtr<CActor> actor = ent)
|
if (TCastToPtr<CActor> actor = ent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -88,7 +88,6 @@ std::unique_ptr<u32[]> CFBStreamedCompression::GetRotationsAndOffsets(u32 words,
|
||||||
u32 bsWords = ComputeBitstreamWords(chans);
|
u32 bsWords = ComputeBitstreamWords(chans);
|
||||||
|
|
||||||
u32* bsPtr = reinterpret_cast<u32*>(bs);
|
u32* bsPtr = reinterpret_cast<u32*>(bs);
|
||||||
size_t wordsz = bsPtr - ret.get();
|
|
||||||
for (u32 w=0 ; w<bsWords ; ++w)
|
for (u32 w=0 ; w<bsWords ; ++w)
|
||||||
bsPtr[w] = in.readUint32Big();
|
bsPtr[w] = in.readUint32Big();
|
||||||
|
|
||||||
|
|
|
@ -186,8 +186,7 @@ void Buckets::Init()
|
||||||
sMinMaxDistance[1] = skWorstMinMaxDistance[1];
|
sMinMaxDistance[1] = skWorstMinMaxDistance[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
CBooRenderer::CAreaListItem::CAreaListItem
|
CBooRenderer::CAreaListItem::CAreaListItem(const std::vector<CMetroidModelInstance>* geom,
|
||||||
(const std::vector<CMetroidModelInstance>* geom,
|
|
||||||
const CAreaRenderOctTree* octTree,
|
const CAreaRenderOctTree* octTree,
|
||||||
std::vector<TCachedToken<CTexture>>&& textures,
|
std::vector<TCachedToken<CTexture>>&& textures,
|
||||||
std::vector<CBooModel*>&& models, int areaIdx,
|
std::vector<CBooModel*>&& models, int areaIdx,
|
||||||
|
|
|
@ -1965,7 +1965,7 @@ bool CElementGen::IsSystemDeletable() const
|
||||||
rstl::optional_object<zeus::CAABox> CElementGen::GetBounds() const
|
rstl::optional_object<zeus::CAABox> CElementGen::GetBounds() const
|
||||||
{
|
{
|
||||||
if (GetParticleCountAll() == 0)
|
if (GetParticleCountAll() == 0)
|
||||||
return {zeus::CAABox()};
|
return {};
|
||||||
else
|
else
|
||||||
return {x2f0_systemBounds};
|
return {x2f0_systemBounds};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue