Skip to content

Commit 797eacf

Browse files
avoitishinXottab-DUTY
authored andcommitted
+ restored config defined sun movement (toggle with define CONFIG_SUN_MOVEMENT) (http://www.gameru.net/forum/index.php?s=60035caee507a30d0e288dd9d04bb20f&showtopic=55777&view=findpost&p=1499977)
+ restored collision with dead bodies (toggle with define DEAD_BODY_COLLISION). Thanks to malandrinus
1 parent 3ee7401 commit 797eacf

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/Common/Config.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
#define ECO_RENDER //ECO_RENDER adds a small delay between rendering, reduce FPS in main menu or in videos
1515
#define NEW_ANIMS // use new animations. Please enclose any new animation additions with this define
1616
#define NEW_SOUNDS // use new sounds. Please enclose any new sound additions with this define
17+
#define DEAD_BODY_COLLISION // restore collision with dead bodies (thanks malandrinus)
18+
//#define CONFIG_SUN_MOVEMENT // With this defined sun will move as configured in weather ltx files

src/xrEngine/Environment.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include "Include/xrRender/RainRender.h"
2424
#include "Include/xrRender/ThunderboltRender.h"
2525

26+
#include "Common/Config.hpp"
27+
2628
//////////////////////////////////////////////////////////////////////
2729
// Construction/Destruction
2830
//////////////////////////////////////////////////////////////////////
@@ -473,9 +475,13 @@ void CEnvironment::OnFrame()
473475
float current_weight;
474476
lerp(current_weight);
475477

478+
//AVO: allow sun to move as defined in configs
479+
#ifndef CONFIG_SUN_MOVEMENT
476480
// Igor. Dynamic sun position.
477481
if (!GlobalEnv.Render->is_sun_static())
478482
calculate_dynamic_sun_dir();
483+
#endif
484+
//-AVO
479485

480486
#ifndef MASTER_GOLD
481487
if (CurrentEnv->sun_dir.y > 0)

src/xrGame/CharacterPhysicsSupport.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "activatingcharcollisiondelay.h"
3333
#include "stalker_movement_manager_smart_cover.h"
3434

35+
#include "Common/Config.hpp"
36+
3537
// const float default_hinge_friction = 5.f;//gray_wolf comment
3638
#ifdef DEBUG
3739
#include "PHDebug.h"
@@ -1119,7 +1121,9 @@ void CCharacterPhysicsSupport::CreateShell(IGameObject* who, Fvector& dp, Fvecto
11191121
if (IsGameTypeSingle())
11201122
{
11211123
m_pPhysicsShell->SetPrefereExactIntegration(); // use exact integration for ragdolls in single
1124+
#ifndef DEAD_BODY_COLLISION
11221125
m_pPhysicsShell->SetRemoveCharacterCollLADisable();
1126+
#endif
11231127
}
11241128
else
11251129
m_pPhysicsShell->SetIgnoreDynamic();

0 commit comments

Comments
 (0)