Skip to content

Commit 575d30f

Browse files
committed
Layers/xrRender/dxDebugRender.cpp: remove unused DebugRenderImpl_1
xrEngine/IGame_Level.cpp: fix sleepless dedicated server xrEngine/EngineAPI.cpp: fix copypaste xrEngine/xr_object_list.cpp: add forgotten &
1 parent 992096c commit 575d30f

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

src/Layers/xrRender/dxDebugRender.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "dxUIShader.h"
77

88
dxDebugRender DebugRenderImpl;
9-
dxDebugRender DebugRenderImpl_1;
109
dxDebugRender::dxDebugRender()
1110
{
1211
m_line_indices.reserve(line_vertex_limit);
@@ -133,8 +132,6 @@ struct RDebugRender : public dxDebugRender, public pureRender
133132
xr_vector<u16> _line_indices;
134133
xr_vector<FVF::L> _line_vertices;
135134

136-
// Vertices _line_vertices;
137-
// Indices _line_indices;
138135
public:
139136
RDebugRender()
140137
{

src/xrEngine/EngineAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ void CEngineAPI::Initialize(void)
179179
tune_pause = (VTPause*)hTuner->getProcAddress("VTPause");
180180
tune_resume = (VTResume*)hTuner->getProcAddress("VTResume");
181181

182-
if (!tune_pause || !tune_pause)
182+
if (!tune_pause || !tune_resume)
183183
{
184184
Log("Can't initialize Intel vTune");
185185
tune_pause = dummy;

src/xrEngine/IGame_Level.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ int psNET_DedicatedSleep = 5;
140140
void IGame_Level::OnRender()
141141
{
142142
if (GEnv.isDedicatedServer)
143+
{
144+
Sleep(psNET_DedicatedSleep);
143145
return;
146+
}
144147

145148
// if (_abs(Device.fTimeDelta)<EPS_S) return;
146149

@@ -153,15 +156,8 @@ void IGame_Level::OnRender()
153156
#endif // _GPA_ENABLED
154157

155158
// Level render, only when no client output required
156-
if (!GEnv.isDedicatedServer)
157-
{
158-
GEnv.Render->Calculate();
159-
GEnv.Render->Render();
160-
}
161-
else
162-
{
163-
Sleep(psNET_DedicatedSleep);
164-
}
159+
GEnv.Render->Calculate();
160+
GEnv.Render->Render();
165161

166162
#ifdef _GPA_ENABLED
167163
TAL_RetireID(rtID);

src/xrEngine/xr_object_list.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ CObjectList::~CObjectList()
5454

5555
IGameObject* CObjectList::FindObjectByName(shared_str name)
5656
{
57-
for (auto it : objects_active)
57+
for (auto& it : objects_active)
5858
if (it->cName().equal(name))
5959
return it;
6060

0 commit comments

Comments
 (0)