Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ikt32 committed May 22, 2016
1 parent d52c95c commit 23c7f71
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Binary file modified Documentation/Changelog.docx
Binary file not shown.
Binary file modified Documentation/README.docx
Binary file not shown.
21 changes: 14 additions & 7 deletions Gears/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,23 +653,24 @@ void handleRPM() {
VEHICLE::_SET_VEHICLE_ENGINE_TORQUE_MULTIPLIER(vehicle, vehData.Rpm * 2.5f);
}

// Game doesn't rev on disengaged clutch in any gear but 1
// This workaround tries to emulate this
// vehData.Clutch >= 0.6: Normal
// vehData.Clutch < 0.6: Nothing happens
/*
Game doesn't rev on disengaged clutch in any gear but 1
This workaround tries to emulate this
Default: vehData.Clutch >= 0.6: Normal
Default: vehData.Clutch < 0.6: Nothing happens
Fix: Emulate 0.6 to 1.0.
*/
if (vehData.CurrGear > 1 && vehData.Clutch < 0.6f) {
if (controls.Clutchvalf > 0.1f && controls.Accelvalf > 0.05f &&
!vehData.SimulatedNeutral) {
//showText(0.4, 0.1, 2.0, "Workaround active");
float revValue;
revValue = controls.Accelvalf- (1.0f - controls.Clutchvalf);
if (revValue > 0.2f) {
ext.SetCurrentRPM(vehicle, revValue);
ext.SetThrottle(vehicle, 1.0f); // For a fuller sound
ext.SetClutch(vehicle, (1.0f - controls.Clutchvalf)*0.5f+0.5f);
return; //Don't set clutch in the end
return; // Skip "normal" clutch thing.
}
//showText(0.4, 0.2, 2.0, (char *)std::to_string(revValue).c_str());
}
if (vehData.SimulatedNeutral) {
float revValue;
Expand All @@ -683,6 +684,12 @@ void handleRPM() {

// Set the clutch depending on neutral status
if (vehData.SimulatedNeutral || controls.Clutchvalf > 0.95) {
/*
To prevent a the clutch not being registered as fully pressed
by the game. Negative values seem to work, but this amount
differs from vehicle to vehicle, so it is at -0.10f to cover
every case. Stronger negative values don't seem problematic.
*/
ext.SetClutch(vehicle, -0.10f);
}
else {
Expand Down

0 comments on commit 23c7f71

Please sign in to comment.