Skip to content
Snippets Groups Projects
Commit 82e01e72 authored by Hoop77's avatar Hoop77 Committed by lenoelda
Browse files

-

parent 69169294
No related merge requests found
......@@ -128,12 +128,13 @@ int main(int argc, char ** argv)
}
else if (cmd == "s")
{
value /= 100.0f;
if (std::abs(value) > MAX_SPEED)
{
value = value >= 0 ? MAX_SPEED : -MAX_SPEED;
std::cout << "WARNING: Speed set to 1.0 due to risk of collision!\n";
}
speed = value / 100.0f;
speed = value;
stopDistance = speed.load() * 15;
std::cout << "Setting speed to: " << speed << "\n";
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment