mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed unarmed ground units not moving
This commit is contained in:
@@ -179,10 +179,9 @@ void GroundUnit::AIloop()
|
|||||||
|
|
||||||
double currentAmmo = computeTotalAmmo();
|
double currentAmmo = computeTotalAmmo();
|
||||||
/* Out of ammo */
|
/* Out of ammo */
|
||||||
if (currentAmmo <= shotsToFire && state != State::IDLE) {
|
if (shotsToFire > 0 && currentAmmo < shotsToFire && state != State::IDLE && state != State::REACH_DESTINATION)
|
||||||
setState(State::IDLE);
|
setState(State::IDLE);
|
||||||
}
|
|
||||||
|
|
||||||
/* Account for unit reloading */
|
/* Account for unit reloading */
|
||||||
if (currentAmmo < oldAmmo)
|
if (currentAmmo < oldAmmo)
|
||||||
totalShellsFired += oldAmmo - currentAmmo;
|
totalShellsFired += oldAmmo - currentAmmo;
|
||||||
|
|||||||
Reference in New Issue
Block a user