BVB Source Codes

CRYENGINE Show AnimationGraphCVars.cpp Source code

Return Download CRYENGINE: download AnimationGraphCVars.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    -------------------------------------------------------------------------
  5.    $Id$
  6.    $DateTime$
  7.    Description: CVars for the AnimationGraph Subsystem
  8.  
  9.    -------------------------------------------------------------------------
  10.    History:
  11.    - 02:03:2006  12:00 : Created by AlexL
  12.  
  13. *************************************************************************/
  14.  
  15. #include "StdAfx.h"
  16.  
  17. #include "AnimationGraphCVars.h"
  18. #include "../Animation/PoseAligner/PoseAligner.h"
  19. #include <CryAction.h>
  20.  
  21. CAnimationGraphCVars* CAnimationGraphCVars::s_pThis = 0;
  22.  
  23. CAnimationGraphCVars::CAnimationGraphCVars()
  24. {
  25.         assert(s_pThis == 0);
  26.         s_pThis = this;
  27.  
  28.         IConsole* pConsole = gEnv->pConsole;
  29.         assert(pConsole);
  30.  
  31.         // TODO: remove once animation graph transition is complete
  32.         REGISTER_CVAR2("ag_debugExactPos", &m_debugExactPos, 0, VF_CHEAT, "Enable/disable exact positioning debugger");
  33.         // ~TODO
  34.  
  35.         REGISTER_CVAR2("ac_forceSimpleMovement", &m_forceSimpleMovement, 0, VF_CHEAT, "Force enable simplified movement (not visible, dedicated server, etc).");
  36.  
  37.         REGISTER_CVAR2("ac_debugAnimEffects", &m_debugAnimEffects, 0, VF_CHEAT, "Print log messages when anim events spawn effects.");
  38.  
  39.         REGISTER_CVAR2("ac_movementControlMethodHor", &m_MCMH, 0, VF_CHEAT, "Overrides the horizontal movement control method specified by AG (overrides filter).");
  40.         REGISTER_CVAR2("ac_movementControlMethodVer", &m_MCMV, 0, VF_CHEAT, "Overrides the vertical movement control method specified by AG (overrides filter).");
  41.         REGISTER_CVAR2("ac_movementControlMethodFilter", &m_MCMFilter, 0, VF_CHEAT, "Force reinterprets Decoupled/CatchUp MCM specified by AG as Entity MCM (H/V overrides override this).");
  42.         REGISTER_CVAR2("ac_templateMCMs", &m_TemplateMCMs, 1, VF_CHEAT, "Use MCMs from AG state templates instead of AG state headers.");
  43.         REGISTER_CVAR2("ac_ColliderModePlayer", &m_forceColliderModePlayer, 0, VF_CHEAT, "Force override collider mode for all players.");
  44.         REGISTER_CVAR2("ac_ColliderModeAI", &m_forceColliderModeAI, 0, VF_CHEAT, "Force override collider mode for all AI.");
  45.         REGISTER_CVAR2("ac_enableExtraSolidCollider", &m_enableExtraSolidCollider, 1, VF_CHEAT, "Enable extra solid collider (for non-pushable characters).");
  46.  
  47.         REGISTER_CVAR2("ac_entityAnimClamp", &m_entityAnimClamp, 1, VF_CHEAT, "Forces the entity movement to be limited by animation.");
  48.         REGISTER_CVAR2("ac_debugAnimTarget", &m_debugAnimTarget, 0, 0, "Display debug history graphs of anim target correction.");
  49.         REGISTER_CVAR2("ac_debugLocationsGraphs", &m_debugLocationsGraphs, 0, 0, "Display debug history graphs of entity locations and movement.");
  50.  
  51.         REGISTER_CVAR2("ac_debugLocations", &m_debugLocations, 0, 0, "Debug render entity location.");
  52.         REGISTER_CVAR2("ac_debugMotionParams", &m_debugMotionParams, 0, 0, "Display graph of motion parameters.");
  53.  
  54.         REGISTER_CVAR2("ac_frametime", &m_debugFrameTime, 0, 0, "Display a graph of the frametime.");
  55.  
  56.         REGISTER_CVAR2("ac_debugText", &m_debugText, 0, 0, "Display entity/animation location/movement values, etc.");
  57.         REGISTER_CVAR2("ac_debugXXXValues", &m_debugTempValues, 0, 0, "Display some values temporarily hooked into temp history graphs.");
  58.         REGISTER_CVAR2("ac_debugEntityParams", &m_debugEntityParams, 0, VF_CHEAT, "Display entity params graphs");
  59.         m_pDebugFilter = REGISTER_STRING("ac_DebugFilter", "0", 0, "Debug specified entity name only.");
  60.  
  61.         REGISTER_CVAR2("ac_debugColliderMode", &m_debugColliderMode, 0, 0, "Display filtered and requested collider modes.");
  62.         REGISTER_CVAR2("ac_debugMovementControlMethods", &m_debugMovementControlMethods, 0, 0, "Display movement control methods.");
  63.  
  64.         REGISTER_CVAR2("ac_disableSlidingContactEvents", &m_disableSlidingContactEvents, 0, 0, "Force disable sliding contact events.");
  65.         REGISTER_CVAR2("ac_useMovementPrediction", &m_useMovementPrediction, 1, 0, "When using animation driven motion sample animation for the root one frame ahead to take into account 1 frame of physics delay");
  66.         REGISTER_CVAR2("ac_useQueuedRotation", &m_useQueuedRotation, 0, 0, "Instead of applying rotation directly, queue it until the beginning of the next frame (synchronizes rotation with translation coming from asynchronous physics)");
  67.  
  68.         REGISTER_CVAR2("g_landingBobTimeFactor", &m_landingBobTimeFactor, 0.2f, VF_CHEAT, "Fraction of the bob time to release full compression");
  69.         REGISTER_CVAR2("g_landingBobLandTimeFactor", &m_landingBobLandTimeFactor, 0.1f, VF_CHEAT, "Fraction of the bob time to be at full compression");
  70.  
  71.         REGISTER_CVAR2("g_distanceForceNoIk", &m_distanceForceNoIk, 0.0f, VF_NULL, "Distance at which to disable ground alignment IK");
  72.         REGISTER_CVAR2("g_distanceForceNoLegRaycasts", &m_distanceForceNoLegRaycasts, 5.0f, VF_NULL, "Distance at which to disable ground alignment IKs raycasts");
  73.         REGISTER_CVAR2("g_spectatorCollisions", &m_spectatorCollisions, 1, VF_CHEAT, "Collide against the geometry in spectator mode");
  74.  
  75.         REGISTER_CVAR2("g_groundAlignAll", &m_groundAlignAll, 1, VF_NULL, "Enable ground alignment for every character that supports it.");
  76.  
  77.         REGISTER_CVAR2("ag_turnSpeedParamScale", &m_turnSpeedParamScale, 0.2f, VF_NULL, "Scale the turn speed animation param (used for leaning)");
  78.         REGISTER_CVAR2("ag_turnSpeedSmoothing", &m_enableTurnSpeedSmoothing, 1, VF_NULL, "Enables/Disables turn speed smoothing.");
  79.         REGISTER_CVAR2("ag_turnAngleSmoothing", &m_enableTurnAngleSmoothing, 1, VF_NULL, "Enables/Disables turn angle smoothing.");
  80.         REGISTER_CVAR2("ag_travelSpeedSmoothing", &m_enableTravelSpeedSmoothing, 1, VF_NULL, "Enables/Disables travel speed smoothing.");
  81.  
  82.         PoseAligner::CVars::GetInstance();
  83. }
  84.  
  85. CAnimationGraphCVars::~CAnimationGraphCVars()
  86. {
  87.         assert(s_pThis != 0);
  88.         s_pThis = 0;
  89.  
  90.         IConsole* pConsole = gEnv->pConsole;
  91.  
  92.         pConsole->UnregisterVariable("ag_debugExactPos", true);
  93.         pConsole->UnregisterVariable("ac_predictionSmoothingPos", true);
  94.         pConsole->UnregisterVariable("ac_predictionSmoothingOri", true);
  95.         pConsole->UnregisterVariable("ac_predictionProbabilityPos", true);
  96.         pConsole->UnregisterVariable("ac_predictionProbabilityOri", true);
  97.  
  98.         pConsole->UnregisterVariable("ac_triggercorrectiontimescale", true);
  99.         pConsole->UnregisterVariable("ac_targetcorrectiontimescale", true);
  100.  
  101.         pConsole->UnregisterVariable("ac_new", true);
  102.         pConsole->UnregisterVariable("ac_movementControlMethodHor", true);
  103.         pConsole->UnregisterVariable("ac_movementControlMethodVer", true);
  104.         pConsole->UnregisterVariable("ac_movementControlMethodFilter", true);
  105.         pConsole->UnregisterVariable("ac_templateMCMs", true);
  106.  
  107.         pConsole->UnregisterVariable("ac_entityAnimClamp", true);
  108.         pConsole->UnregisterVariable("ac_animErrorClamp", true);
  109.         pConsole->UnregisterVariable("ac_animErrorMaxDistance", true);
  110.         pConsole->UnregisterVariable("ac_animErrorMaxAngle", true);
  111.         pConsole->UnregisterVariable("ac_debugAnimError", true);
  112.  
  113.         pConsole->UnregisterVariable("ac_debugLocations", true);
  114.         pConsole->UnregisterVariable("ac_debugMotionParams", true);
  115.  
  116.         pConsole->UnregisterVariable("ac_frametime", true);
  117.  
  118.         pConsole->UnregisterVariable("ac_debugText", true);
  119.         pConsole->UnregisterVariable("ac_debugXXXValues", true);
  120.         pConsole->UnregisterVariable("ac_debugEntityParams", true);
  121.         pConsole->UnregisterVariable("ac_DebugFilter", true);
  122.  
  123.         pConsole->UnregisterVariable("ac_debugColliderMode", true);
  124.         pConsole->UnregisterVariable("ac_debugMovementControlMethods", true);
  125.  
  126.         pConsole->UnregisterVariable("ac_disableSlidingContactEvents", true);
  127.         pConsole->UnregisterVariable("ac_useMovementPrediction", true);
  128.         pConsole->UnregisterVariable("ac_useQueuedRotation", true);
  129.  
  130.         pConsole->UnregisterVariable("ac_debugCarryCorrection", true);
  131.  
  132.         pConsole->UnregisterVariable("g_distanceForceNoIk", true);
  133.         pConsole->UnregisterVariable("g_spectatorCollisions", true);
  134.  
  135.         pConsole->UnregisterVariable("ag_turnSpeedParamScale", true);
  136.  
  137.         pConsole->UnregisterVariable("ac_forceSimpleMovement", true);
  138.         pConsole->UnregisterVariable("ac_debugAnimEffects", true);
  139.         pConsole->UnregisterVariable("ac_ColliderModePlayer", true);
  140.         pConsole->UnregisterVariable("ac_ColliderModeAI", true);
  141.         pConsole->UnregisterVariable("ac_enableExtraSolidCollider", true);
  142.         pConsole->UnregisterVariable("ac_debugAnimTarget", true);
  143.         pConsole->UnregisterVariable("ac_debugLocationsGraphs", true);
  144.         pConsole->UnregisterVariable("g_landingBobTimeFactor", true);
  145.         pConsole->UnregisterVariable("g_landingBobLandTimeFactor", true);
  146.         pConsole->UnregisterVariable("g_distanceForceNoLegRaycasts", true);
  147.         pConsole->UnregisterVariable("g_groundAlignAll", true);
  148.         pConsole->UnregisterVariable("ag_turnSpeedSmoothing", true);
  149.         pConsole->UnregisterVariable("ag_turnAngleSmoothing", true);
  150.         pConsole->UnregisterVariable("ag_travelSpeedSmoothing", true);
  151. }
  152.  
downloadAnimationGraphCVars.cpp Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top