mirror of
https://github.com/Relintai/godot-lportal.git
synced 2024-11-11 10:52:09 +01:00
SOB visibility to bitflags
This commit is contained in:
parent
fe83f1374e
commit
805b6153b6
2
ldob.h
2
ldob.h
@ -38,7 +38,7 @@ public:
|
||||
|
||||
ObjectID m_ID; // godot object
|
||||
AABB m_aabb; // world space
|
||||
bool m_bVisible;
|
||||
//bool m_bSOBVisible;
|
||||
};
|
||||
|
||||
// dynamic object
|
||||
|
24
lroom.cpp
24
lroom.cpp
@ -180,11 +180,9 @@ void LRoom::FinalizeVisibility(LRoomManager &manager)
|
||||
|
||||
if (pVI)
|
||||
{
|
||||
SoftShow(pVI, sob.m_bVisible);
|
||||
// if (sob.m_bVisible)
|
||||
// pVI->show();
|
||||
// else
|
||||
// pVI->hide();
|
||||
//SoftShow(pVI, sob.m_bSOBVisible);
|
||||
bool bVisible = manager.m_BF_visible_SOBs.GetBit(n) != 0;
|
||||
SoftShow(pVI, bVisible);
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,14 +301,12 @@ void LRoom::FirstTouch(LRoomManager &manager)
|
||||
manager.m_pCurr_VisibleRoomList->push_back(m_RoomID);
|
||||
|
||||
// hide all objects
|
||||
int last_sob = m_iFirstSOB + m_iNumSOBs;
|
||||
for (int n=m_iFirstSOB; n<last_sob; n++)
|
||||
{
|
||||
LSob &sob = manager.m_SOBs[n];
|
||||
sob.m_bVisible = false;
|
||||
}
|
||||
// for (int n=0; n<m_SOBs.size(); n++)
|
||||
// m_SOBs[n].m_bVisible = false;
|
||||
// int last_sob = m_iFirstSOB + m_iNumSOBs;
|
||||
// for (int n=m_iFirstSOB; n<last_sob; n++)
|
||||
// {
|
||||
// LSob &sob = manager.m_SOBs[n];
|
||||
// sob.m_bSOBVisible = false;
|
||||
// }
|
||||
|
||||
// hide all dobs
|
||||
for (int n=0; n<m_DOBs.size(); n++)
|
||||
@ -389,7 +385,7 @@ void LRoom::DetermineVisibility_Recursive(LRoomManager &manager, int depth, cons
|
||||
|
||||
if (bShow)
|
||||
{
|
||||
sob.m_bVisible = true;
|
||||
//sob.m_bSOBVisible = true;
|
||||
// sob is renderable and visible (not shadow only)
|
||||
manager.m_BF_visible_SOBs.SetBit(n, true);
|
||||
//manager.m_BF_render_SOBs.SetBit(n, true);
|
||||
|
Loading…
Reference in New Issue
Block a user