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();
|
||||
/* Out of ammo */
|
||||
if (currentAmmo <= shotsToFire && state != State::IDLE) {
|
||||
if (shotsToFire > 0 && currentAmmo < shotsToFire && state != State::IDLE && state != State::REACH_DESTINATION)
|
||||
setState(State::IDLE);
|
||||
}
|
||||
|
||||
|
||||
/* Account for unit reloading */
|
||||
if (currentAmmo < oldAmmo)
|
||||
totalShellsFired += oldAmmo - currentAmmo;
|
||||
|
||||
Reference in New Issue
Block a user