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:
parent
fd72d4ae2d
commit
de1f233848
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user