Skip to content

Commit 369c88c

Browse files
jonwilxezon
authored andcommitted
Fix props
1 parent b52fc17 commit 369c88c

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

src/game/common/gamemain.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
* LICENSE
1414
*/
1515
#include "gamemain.h"
16-
#include "win32gameengine.h"
1716
#include "bitflags.h"
1817
#include "disabledtypes.h"
18+
#include "win32gameengine.h"
1919

2020
GameEngine *Create_Game_Engine()
2121
{
@@ -33,8 +33,8 @@ void Game_Main(int argc, char *argv[])
3333
{
3434
g_theGameEngine = Create_Game_Engine();
3535
g_theGameEngine->Init(argc, argv);
36-
// this should happen in GameEngine::Init but we don't have that yet
37-
DISABLEDMASK_ALL.Set_All();
36+
// TODO this should happen in GameEngine::Init but we don't have that yet
37+
Init_Disabled_Masks();
3838
g_theGameEngine->Execute();
3939

4040
if (g_theGameEngine != nullptr) {

src/game/common/system/disabledtypes.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ const char *DisabledBitFlags::s_bitNamesList[DISABLED_TYPE_COUNT + 1] = {
3636

3737
DisabledBitFlags DISABLEDMASK_ALL;
3838
DisabledBitFlags DISABLEDMASK_NONE;
39+
40+
void Init_Disabled_Masks()
41+
{
42+
DISABLEDMASK_ALL.Set_All();
43+
}

src/game/common/system/disabledtypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ using DisabledBitFlags = BitFlags<DISABLED_TYPE_COUNT>;
3939

4040
extern DisabledBitFlags DISABLEDMASK_ALL;
4141
extern DisabledBitFlags DISABLEDMASK_NONE;
42+
void Init_Disabled_Masks();

src/platform/w3dengine/client/w3dpropbuffer.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,15 @@ void W3DPropBuffer::Draw_Props(RenderInfoClass &rinfo)
221221

222222
m_props[i].shroud_status =
223223
g_thePartitionManager->Get_Prop_Shroud_Status_For_Player(index, &m_props[i].position);
224+
}
224225

225-
if (m_props[i].shroud_status < SHROUDED_UNK4 && m_props[i].shroud_status > SHROUDED_INVALID) {
226-
if (g_theTerrainRenderObject->Get_Shroud() != nullptr && m_props[i].shroud_status != SHROUDED_INVALID) {
227-
rinfo.Push_Material_Pass(m_shroudMaterial);
228-
m_props[i].render_obj->Render(rinfo);
229-
rinfo.Pop_Material_Pass();
230-
} else {
231-
m_props[i].render_obj->Render(rinfo);
232-
}
226+
if (m_props[i].shroud_status < SHROUDED_UNK4 && m_props[i].shroud_status > SHROUDED_INVALID) {
227+
if (g_theTerrainRenderObject->Get_Shroud() != nullptr && m_props[i].shroud_status != SHROUDED_INVALID) {
228+
rinfo.Push_Material_Pass(m_shroudMaterial);
229+
m_props[i].render_obj->Render(rinfo);
230+
rinfo.Pop_Material_Pass();
231+
} else {
232+
m_props[i].render_obj->Render(rinfo);
233233
}
234234
}
235235
}

0 commit comments

Comments
 (0)