Skip to content

Commit 3886cc0

Browse files
xezonfeliwir
authored andcommitted
Optimize W3DPropBuffer::Draw_Props
1 parent 085b54c commit 3886cc0

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/platform/w3dengine/client/w3dpropbuffer.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,9 @@ void W3DPropBuffer::Draw_Props(RenderInfoClass &rinfo)
208208
if (m_props[i].is_visible && m_props[i].render_obj != nullptr) {
209209
if (g_thePlayerList == nullptr || g_thePartitionManager == nullptr) {
210210
m_props[i].shroud_status = SHROUDED_NONE;
211-
}
212-
213-
if (m_props[i].shroud_status == SHROUDED_INVALID) {
214-
int index;
215211

216-
if (g_thePlayerList != nullptr) {
217-
index = g_thePlayerList->Get_Local_Player()->Get_Player_Index();
218-
} else {
219-
index = 0;
220-
}
212+
} else if (m_props[i].shroud_status == SHROUDED_INVALID) {
213+
const int index = g_thePlayerList->Get_Local_Player()->Get_Player_Index();
221214

222215
m_props[i].shroud_status =
223216
g_thePartitionManager->Get_Prop_Shroud_Status_For_Player(index, &m_props[i].position);

0 commit comments

Comments
 (0)