mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Minor bugfixes
This commit is contained in:
parent
658efe3daf
commit
911a81169b
@ -75,7 +75,7 @@ export class Slider {
|
||||
{
|
||||
this.#value = newValue;
|
||||
if (this.#slider != null)
|
||||
this.#slider.value = String((newValue - this.#minValue) / (this.#maxValue - this.#minValue) * 100);
|
||||
this.#slider.value = String((newValue - this.#minValue) / (this.#maxValue - this.#minValue) * parseFloat(this.#slider.max));
|
||||
this.#onValue()
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ export class Slider {
|
||||
this.#dragged = false;
|
||||
if (this.#slider != null)
|
||||
{
|
||||
this.#value = this.#minValue + parseFloat(this.#slider.value) / 100 * (this.#maxValue - this.#minValue);
|
||||
this.#value = this.#minValue + parseFloat(this.#slider.value) / parseFloat(this.#slider.max) * (this.#maxValue - this.#minValue);
|
||||
this.#callback(this.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
local version = 'v0.1.0-alpha'
|
||||
local version = 'v0.1.1-alpha'
|
||||
|
||||
Olympus = {}
|
||||
Olympus.OlympusDLL = nil
|
||||
|
||||
@ -63,11 +63,13 @@ void Aircraft::changeAltitude(wstring change)
|
||||
void Aircraft::setTargetSpeed(double newTargetSpeed) {
|
||||
targetSpeed = newTargetSpeed;
|
||||
addMeasure(L"targetSpeed", json::value(targetSpeed));
|
||||
goToDestination();
|
||||
if (activeDestination != NULL)
|
||||
goToDestination();
|
||||
}
|
||||
|
||||
void Aircraft::setTargetAltitude(double newTargetAltitude) {
|
||||
targetAltitude = newTargetAltitude;
|
||||
addMeasure(L"targetAltitude", json::value(targetAltitude));
|
||||
goToDestination();
|
||||
if (activeDestination != NULL)
|
||||
goToDestination();
|
||||
}
|
||||
@ -149,7 +149,7 @@ bool AirUnit::updateActivePath(bool looping)
|
||||
/* Push the next destination in the queue to the front */
|
||||
if (looping)
|
||||
pushActivePathBack(activePath.front());
|
||||
activePath.pop_front();
|
||||
popActivePathFront();
|
||||
log(unitName + L" active path front popped");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -201,7 +201,6 @@ void Unit::popActivePathFront()
|
||||
setActivePath(path);
|
||||
}
|
||||
|
||||
|
||||
void Unit::setCoalitionID(int newCoalitionID)
|
||||
{
|
||||
if (newCoalitionID == 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user