@@ -13,6 +13,8 @@ MotionControl* mCtrlGlobal = NULL;
1313mINI ::INIStructure Config;
1414
1515float CamoIndexModifier = 1 .0f ;
16+ float CrouchWalkSpeed = 6 .0f ;
17+ float CrouchStalkSpeed = 3 .0f ;
1618int CamoIndexValue = 0 ;
1719bool CrouchWalkEnabled = false ;
1820bool CrouchMoving = false ;
@@ -77,7 +79,7 @@ int* __fastcall CalculateCamoIndexHook(int* a1, int a2)
7779{
7880 int * result = CalculateCamoIndex (a1, a2);
7981
80- if (CamoIndexData == NULL || CrouchWalkEnabled || !CrouchMoving)
82+ if (CamoIndexData == NULL || ! CrouchWalkEnabled || !CrouchMoving)
8183 return result;
8284
8385 int index = a2 << 7 ;
@@ -130,7 +132,7 @@ int* __fastcall ActionSquatStillHook(int64_t work, MovementWork* plWork, int64_t
130132 plWork->motion = PlayerSetMotion (work, PlayerMotion::StandMoveStalk); // hijack the stalking motion
131133
132134 if (mCtrlGlobal != NULL )
133- mCtrlGlobal ->mtcmControl ->motionTimeBase = CrouchMovingSlow ? 3.0 : 6.0 ;
135+ mCtrlGlobal ->mtcmControl ->motionTimeBase = CrouchMovingSlow ? CrouchStalkSpeed : CrouchWalkSpeed ;
134136
135137 CrouchWalkEnabled = true ;
136138 }
@@ -175,6 +177,8 @@ void ReadConfig()
175177 file.read (Config);
176178 CamoIndexModifier = std::stof (Config[" Settings" ][" CamoIndexModifier" ]);
177179 CamoIndexValue = std::stoi (Config[" Settings" ][" CamoIndexValue" ]) * 10 ;
180+ CrouchWalkSpeed = std::stof (Config[" Settings" ][" CrouchWalkSpeed" ]);
181+ CrouchStalkSpeed = std::stof (Config[" Settings" ][" CrouchStalkSpeed" ]);
178182}
179183
180184DWORD WINAPI MainThread (LPVOID lpParam)
0 commit comments