File vdrift-fix-no-matching-function-for-call-to-max.patch of Package vdrift

diff -Nur vdrift-orig/src/ai/ai_car_experimental.cpp vdrift/src/ai/ai_car_experimental.cpp
--- vdrift-orig/src/ai/ai_car_experimental.cpp	2014-10-16 18:51:25.000000000 +0200
+++ vdrift/src/ai/ai_car_experimental.cpp	2023-01-22 11:29:06.682497128 +0100
@@ -829,7 +829,7 @@
 {
 	const float spacingdistance = 3.5; //how far left and right we target for our spacing in meters (center of mass to center of mass)
 	const float horizontal_meters_per_second = 5.0; //how fast we want to steer away in horizontal meters per second
-	const float speed = std::max(1.0f, car->GetVelocity().length());
+	const float speed = std::max(btScalar(1.0f), car->GetVelocity().length());
 	const float authority = std::min(10.0, (180.0 / 3.141593) * atan(horizontal_meters_per_second / speed)); //steering bias authority limit magnitude in degrees
 	const float gain = 4.0; //amplify steering command by this factor
 	const float mineta = 1.0; //fastest reaction time in seconds
diff -Nur vdrift-orig/src/ai/ai_car_standard.cpp vdrift/src/ai/ai_car_standard.cpp
--- vdrift-orig/src/ai/ai_car_standard.cpp	2014-10-16 18:50:58.000000000 +0200
+++ vdrift/src/ai/ai_car_standard.cpp	2023-01-22 11:29:42.374654278 +0100
@@ -704,7 +704,7 @@
 {
 	const float spacingdistance = 3.5; //how far left and right we target for our spacing in meters (center of mass to center of mass)
 	const float horizontal_meters_per_second = 5.0; //how fast we want to steer away in horizontal meters per second
-	const float speed = std::max(1.0f, car->GetVelocity().length());
+	const float speed = std::max(btScalar(1.0f), car->GetVelocity().length());
 	const float authority = std::min(10.0, (180.0 / 3.141593) * atan(horizontal_meters_per_second / speed)); //steering bias authority limit magnitude in degrees
 	const float gain = 4.0; //amplify steering command by this factor
 	const float mineta = 1.0; //fastest reaction time in seconds
diff -Nur vdrift-orig/src/physics/cardynamics.cpp vdrift/src/physics/cardynamics.cpp
--- vdrift-orig/src/physics/cardynamics.cpp	2014-10-05 20:30:16.000000000 +0200
+++ vdrift/src/physics/cardynamics.cpp	2023-01-22 11:38:19.148910691 +0100
@@ -1716,7 +1716,7 @@
 		btScalar ramp = 0.8f * (rpm_engine - rpm_stall) / (rpm_min - rpm_stall);
 		btScalar torque_limit = engine.GetTorque() * ramp;
 		clutch_new = torque_limit / clutch.GetMaxTorque();
-		btClamp(clutch_new, 0.0f, 1.0f);
+		btClamp(clutch_new, btScalar(0.0f), btScalar(1.0f));
 	}
 
 	// shifting
openSUSE Build Service is sponsored by