mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added stop command to helicopters
This commit is contained in:
@@ -45,10 +45,7 @@ Helicopter::Helicopter(json::value json, unsigned int ID) : AirUnit(json, ID)
|
|||||||
void Helicopter::changeSpeed(string change)
|
void Helicopter::changeSpeed(string change)
|
||||||
{
|
{
|
||||||
if (change.compare("stop") == 0)
|
if (change.compare("stop") == 0)
|
||||||
{
|
setState(State::IDLE);
|
||||||
/* Air units can't hold a position, so we can only set them to hold. At the moment, this will erase any other command. TODO: helicopters should be able to hover in place */
|
|
||||||
clearActivePath();
|
|
||||||
}
|
|
||||||
else if (change.compare("slow") == 0)
|
else if (change.compare("slow") == 0)
|
||||||
desiredSpeed -= knotsToMs(10);
|
desiredSpeed -= knotsToMs(10);
|
||||||
else if (change.compare("fast") == 0)
|
else if (change.compare("fast") == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user