77#include " stdafx.h"
88#include " stats_manager.h"
99
10- #ifdef _EDITOR
11- const bool g_dedicated_server = false ;
12- #endif
13-
1410void stats_manager::increment_stats (u32 size, enum_stats_buffer_type type, _D3DPOOL location)
1511{
16- if (g_dedicated_server )
12+ if (GEnv. isDedicatedServer )
1713 return ;
1814
1915 R_ASSERT (type >= 0 && type < enum_stats_buffer_type_COUNT);
@@ -23,7 +19,7 @@ void stats_manager::increment_stats(u32 size, enum_stats_buffer_type type, _D3DP
2319
2420void stats_manager::increment_stats (u32 size, enum_stats_buffer_type type, _D3DPOOL location, void * buff_ptr)
2521{
26- if (g_dedicated_server )
22+ if (GEnv. isDedicatedServer )
2723 return ;
2824
2925 R_ASSERT (buff_ptr != NULL );
@@ -44,7 +40,7 @@ void stats_manager::increment_stats(u32 size, enum_stats_buffer_type type, _D3DP
4440
4541void stats_manager::increment_stats_rtarget (ID3DTexture2D* buff)
4642{
47- if (g_dedicated_server )
43+ if (GEnv. isDedicatedServer )
4844 return ;
4945
5046 _D3DPOOL pool = D3DPOOL_MANAGED;
@@ -63,7 +59,7 @@ void stats_manager::increment_stats_rtarget(ID3DTexture2D* buff)
6359
6460void stats_manager::increment_stats_vb (ID3DVertexBuffer* buff)
6561{
66- if (g_dedicated_server )
62+ if (GEnv. isDedicatedServer )
6763 return ;
6864
6965#if defined(USE_DX10) || defined(USE_DX11)
@@ -79,7 +75,7 @@ void stats_manager::increment_stats_vb(ID3DVertexBuffer* buff)
7975
8076void stats_manager::increment_stats_ib (ID3DIndexBuffer* buff)
8177{
82- if (g_dedicated_server )
78+ if (GEnv. isDedicatedServer )
8379 return ;
8480
8581#if defined(USE_DX10) || defined(USE_DX11)
@@ -95,7 +91,7 @@ void stats_manager::increment_stats_ib(ID3DIndexBuffer* buff)
9591
9692void stats_manager::decrement_stats_rtarget (ID3DTexture2D* buff)
9793{
98- if (buff == nullptr || g_dedicated_server )
94+ if (buff == nullptr || GEnv. isDedicatedServer )
9995 return ;
10096
10197 buff->AddRef ();
@@ -119,7 +115,7 @@ void stats_manager::decrement_stats_rtarget(ID3DTexture2D* buff)
119115
120116void stats_manager::decrement_stats_vb (ID3DVertexBuffer* buff)
121117{
122- if (buff == nullptr || g_dedicated_server )
118+ if (buff == nullptr || GEnv. isDedicatedServer )
123119 return ;
124120
125121 buff->AddRef ();
@@ -140,7 +136,7 @@ void stats_manager::decrement_stats_vb(ID3DVertexBuffer* buff)
140136
141137void stats_manager::decrement_stats_ib (ID3DIndexBuffer* buff)
142138{
143- if (buff == nullptr || g_dedicated_server )
139+ if (buff == nullptr || GEnv. isDedicatedServer )
144140 return ;
145141
146142 buff->AddRef ();
@@ -161,7 +157,7 @@ void stats_manager::decrement_stats_ib(ID3DIndexBuffer* buff)
161157
162158void stats_manager::decrement_stats (u32 size, enum_stats_buffer_type type, _D3DPOOL location)
163159{
164- if (g_dedicated_server )
160+ if (GEnv. isDedicatedServer )
165161 return ;
166162
167163 R_ASSERT (type >= 0 && type < enum_stats_buffer_type_COUNT);
@@ -171,7 +167,7 @@ void stats_manager::decrement_stats(u32 size, enum_stats_buffer_type type, _D3DP
171167
172168void stats_manager::decrement_stats (u32 size, enum_stats_buffer_type type, _D3DPOOL location, void * buff_ptr)
173169{
174- if (buff_ptr == nullptr || g_dedicated_server )
170+ if (buff_ptr == nullptr || GEnv. isDedicatedServer )
175171 return ;
176172
177173#ifdef DEBUG
0 commit comments