Skip to content

Commit b65b67e

Browse files
committed
Много мелких изменений
1 parent e25f7f0 commit b65b67e

10 files changed

Lines changed: 80 additions & 33 deletions

File tree

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ph_iterations 18
22

3-
snd_device OpenAL Soft
43
snd_efx off
54

65
r__actor_shadow off
76

87
g_3d_scopes on
8+
g_3d_scopes_fps_factor 4
99
r2_exp_donttest_shad off
1010
r2_sun on
1111
r2_sun_quality st_opt_low
@@ -15,11 +15,20 @@ r4_enable_tessellation on
1515
r__detail_density 0.63
1616
r__detail_radius 165
1717
r__detail_scale 1.13
18-
r__smap_size 4096x4096
18+
r__smap_size 2560x2560
1919
r__tf_aniso 16
2020
r__tf_mipbias -0.5
2121
r__wallmark_ttl 60.
2222
r_aa_mode st_opt_smaa
23-
r_fps_lock fpslock120
23+
r_fps_lock nofpslock
2424
r_sslr_enable on
2525
rs_v_sync on
26+
r2_ssao st_opt_off
27+
r2_volumetric_lights off
28+
ai_use_torch_dynamic_lights off
29+
r2_rain_drops off
30+
r_sunshafts_mode ss_manowar
31+
r2_steep_parallax on
32+
r3_msaa 2x
33+
34+
r_terrain_parallax_enable off
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
renderer renderer_r4
1+
r__smap_size 4096x4096
22
g_3d_scopes on
33
g_3d_scopes_fps_factor 2
4-
r2_volumetric_lights on
54
r_sunshafts_mode ss_manowar
65
r3_msaa 4x
6+
r_sslr_enable on
7+
r4_enable_tessellation on
8+
r3_dynamic_wet_surfaces on
9+
r2_steep_parallax on
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
renderer renderer_r4
1+
r__smap_size 3072x3072
22
g_3d_scopes on
3-
g_3d_scopes_fps_factor 2
4-
r2_volumetric_lights on
3+
g_3d_scopes_fps_factor 3
54
r_sunshafts_mode ss_manowar
6-
r3_msaa 4x
5+
r3_msaa 2x
6+
r_sslr_enable on
7+
r4_enable_tessellation on
8+
r3_dynamic_wet_surfaces on
9+
r2_steep_parallax on
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
renderer renderer_r2.5
1+
r__smap_size 2048x2048
2+
g_3d_scopes off
23
g_3d_scopes_fps_factor 4
3-
r2_ssao_mode disabled
4-
r2_volumetric_lights off
4+
r2_ssao st_opt_off
5+
ai_use_torch_dynamic_lights off
56
r_sunshafts_mode st_opt_off
67
r3_msaa 2x
8+
r_sslr_enable off
9+
r4_enable_tessellation off
10+
r3_dynamic_wet_surfaces off
11+
r2_steep_parallax off
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
renderer renderer_r2a
1+
r__smap_size 1536x1536
22
g_3d_scopes off
3-
r2_ssao_mode disabled
4-
r2_volumetric_lights off
3+
g_3d_scopes_fps_factor 4
4+
r2_ssao st_opt_off
5+
ai_use_torch_dynamic_lights off
56
r_sunshafts_mode st_opt_off
67
r3_msaa st_opt_off
8+
r_sslr_enable off
9+
r4_enable_tessellation off
10+
r3_dynamic_wet_surfaces off
11+
r2_steep_parallax off

ogsr_engine/xrGame/HudItem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ void CHudItem::UpdateCL()
316316
}
317317
}
318318

319-
AllowHudBobbing((Core.Features.test(xrCore::Feature::wpn_bobbing) && allow_bobbing) || Actor()->PsyAuraAffect);
319+
AllowHudBobbing((Core.Features.test(xrCore::Feature::wpn_bobbing) && allow_bobbing) || (g_actor && g_actor->PsyAuraAffect));
320320

321321
TimeLockAnimation();
322322
}

ogsr_engine/xrGame/embedded_editor/embedded_editor_weather.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ int compare_naturally(const void* a_ptr, const void* b_ptr)
205205

206206
bool SelectTexture(const char* label, shared_str& texName)
207207
{
208-
char tex[100];
209-
strncpy(tex, texName.data(), 100);
208+
string1024 tex;
209+
strcpy_s(tex, texName.data());
210210

211211
bool changed = false;
212212
static shared_str prevValue;
@@ -438,8 +438,8 @@ void ShowWeatherEditor(bool& show)
438438

439439
if (SelectTexture("sky_texture", cur->sky_texture_name))
440440
{
441-
char buf[100];
442-
strconcat(sizeof(buf), buf, cur->sky_texture_name.data(), "#small");
441+
string1024 buf;
442+
xr_strconcat(buf, cur->sky_texture_name.data(), "#small");
443443
cur->sky_texture_env_name = buf;
444444
cur->on_device_create();
445445
changed = true;

ogsr_engine/xrGame/ui/UICellCustomItems.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,15 @@ void CUIAmmoCellItem::Update()
174174

175175
void CUIAmmoCellItem::UpdateItemText()
176176
{
177-
if (NULL == m_custom_draw)
177+
if (!m_custom_draw)
178178
{
179-
xr_vector<CUICellItem*>::iterator it = m_childs.begin();
180-
xr_vector<CUICellItem*>::iterator it_e = m_childs.end();
179+
u16 total{};
180+
if (auto* curr_obj = object())
181+
total = curr_obj->m_boxCurr;
181182

182-
u16 total = object()->m_boxCurr;
183-
for (; it != it_e; ++it)
184-
total = total + ((CUIAmmoCellItem*)(*it))->object()->m_boxCurr;
183+
for (auto* child : m_childs)
184+
if (auto* child_obj = smart_cast<CUIAmmoCellItem*>(child)->object())
185+
total += child_obj->m_boxCurr;
185186

186187
string32 str;
187188
sprintf_s(str, "%d", total);

ogsr_engine/xrGame/ui/UICellCustomItems.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CUIAmmoCellItem : public CUIInventoryCellItem
3535
CUIAmmoCellItem(CWeaponAmmo* itm);
3636
virtual void Update();
3737
virtual bool EqualTo(CUICellItem* itm);
38-
CWeaponAmmo* object() { return (CWeaponAmmo*)m_pData; }
38+
CWeaponAmmo* object() { return static_cast<CWeaponAmmo*>(m_pData); }
3939
};
4040

4141
class CUIWeaponCellItem : public CUIInventoryCellItem

ogsr_engine/xr_3da/GameMtlLib.h

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,19 +281,40 @@ class MTL_EXPORT_API CGameMtlLibrary
281281
IC u16 GetMaterialIdx(int ID)
282282
{
283283
GameMtlIt it = GetMaterialItByID(ID);
284-
VERIFY(materials.end() != it);
285-
return (u16)(it - materials.begin());
284+
if (materials.end() != it)
285+
{
286+
return static_cast<u16>(std::distance(materials.begin(), it));
287+
}
288+
else
289+
{
290+
Msg("!![%s] material id [%d] not found!", __FUNCTION__, ID);
291+
return 0;
292+
}
286293
}
287294
IC u16 GetMaterialIdx(LPCSTR name)
288295
{
289296
GameMtlIt it = GetMaterialIt(name);
290-
VERIFY(materials.end() != it);
291-
return (u16)(it - materials.begin());
297+
if (materials.end() != it)
298+
{
299+
return static_cast<u16>(std::distance(materials.begin(), it));
300+
}
301+
else
302+
{
303+
Msg("!![%s] material name [%s] not found!", __FUNCTION__, name);
304+
return 0;
305+
}
292306
}
293307
IC SGameMtl* GetMaterialByIdx(u16 idx)
294308
{
295-
VERIFY(idx < (u16)materials.size());
296-
return materials[idx];
309+
if (idx < static_cast<u16>(materials.size()))
310+
{
311+
return materials[idx];
312+
}
313+
else
314+
{
315+
Msg("!![%s] material id [%u] not found!", __FUNCTION__, idx);
316+
return materials.front();
317+
}
297318
}
298319

299320
IC GameMtlIt FirstMaterial() { return materials.begin(); }

0 commit comments

Comments
 (0)