Skip to content

Commit

Permalink
+ restored config defined sun movement (toggle with define CONFIG_SUN…
Browse files Browse the repository at this point in the history
…_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
  • Loading branch information
avoitishin authored and Xottab-DUTY committed Aug 19, 2017
1 parent 3ee7401 commit 797eacf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Common/Config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
#define ECO_RENDER //ECO_RENDER adds a small delay between rendering, reduce FPS in main menu or in videos
#define NEW_ANIMS // use new animations. Please enclose any new animation additions with this define
#define NEW_SOUNDS // use new sounds. Please enclose any new sound additions with this define
#define DEAD_BODY_COLLISION // restore collision with dead bodies (thanks malandrinus)
//#define CONFIG_SUN_MOVEMENT // With this defined sun will move as configured in weather ltx files
6 changes: 6 additions & 0 deletions src/xrEngine/Environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "Include/xrRender/RainRender.h"
#include "Include/xrRender/ThunderboltRender.h"

#include "Common/Config.hpp"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -473,9 +475,13 @@ void CEnvironment::OnFrame()
float current_weight;
lerp(current_weight);

//AVO: allow sun to move as defined in configs
#ifndef CONFIG_SUN_MOVEMENT
// Igor. Dynamic sun position.
if (!GlobalEnv.Render->is_sun_static())
calculate_dynamic_sun_dir();
#endif
//-AVO

#ifndef MASTER_GOLD
if (CurrentEnv->sun_dir.y > 0)
Expand Down
4 changes: 4 additions & 0 deletions src/xrGame/CharacterPhysicsSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include "activatingcharcollisiondelay.h"
#include "stalker_movement_manager_smart_cover.h"

#include "Common/Config.hpp"

// const float default_hinge_friction = 5.f;//gray_wolf comment
#ifdef DEBUG
#include "PHDebug.h"
Expand Down Expand Up @@ -1119,7 +1121,9 @@ void CCharacterPhysicsSupport::CreateShell(IGameObject* who, Fvector& dp, Fvecto
if (IsGameTypeSingle())
{
m_pPhysicsShell->SetPrefereExactIntegration(); // use exact integration for ragdolls in single
#ifndef DEAD_BODY_COLLISION
m_pPhysicsShell->SetRemoveCharacterCollLADisable();
#endif
}
else
m_pPhysicsShell->SetIgnoreDynamic();
Expand Down

0 comments on commit 797eacf

Please sign in to comment.