Skip to content

Commit

Permalink
Limit director speed and disallow negative speed.
Browse files Browse the repository at this point in the history
Speed is now limited to 5000 and setting negative speed should no longer be possible.
  • Loading branch information
num0005 committed Jul 15, 2018
1 parent c6c132d commit 37ebf78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions H2Codez/H2Codez.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;H2CODEZ_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NOMINMAX;_DEBUG;_WINDOWS;_USRDLL;H2CODEZ_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4005;4800;4996;4200</DisableSpecificWarnings>
<AdditionalOptions>/std:c++14 %(AdditionalOptions)</AdditionalOptions>
<ExceptionHandling>Async</ExceptionHandling>
Expand All @@ -82,7 +82,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>false</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;H2CODEZ_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NOMINMAX;_WINDOWS;_USRDLL;H2CODEZ_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DisableSpecificWarnings>4005;4800;4996;4200</DisableSpecificWarnings>
<AdditionalOptions>/std:c++14 %(AdditionalOptions)</AdditionalOptions>
Expand Down
1 change: 1 addition & 0 deletions H2Codez/H2Sapien/H2Sapien.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ INT_PTR CALLBACK CustomDirectorSpeed(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA
{
try {
float new_speed = std::stof(speed_text);
new_speed = std::fmin(std::fabs(new_speed), 5000.0f);
WriteValue(0x009AAC60, new_speed);
print_to_console("speed is now " + std::to_string(new_speed));
}
Expand Down

0 comments on commit 37ebf78

Please sign in to comment.