mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed merge error
This commit is contained in:
parent
e430d38c63
commit
532c09a815
@ -1053,9 +1053,7 @@ function Olympus.setUnitsData(arg, time)
|
||||
table["isHuman"] = (unit:getPlayerName() ~= nil)
|
||||
table["hasTask"] = controller:hasTask()
|
||||
table["ammo"] = unit:getAmmo() --TODO remove a lot of stuff we don't really need
|
||||
table["ammo"] = unit:getAmmo() --TODO: remove a lot of stuff we don't really need
|
||||
table["fuel"] = unit:getFuel()
|
||||
table["health"] = unit:getLife() / unit:getLife0() * 100
|
||||
table["health"] = unit:getLife() / initialLife * 100
|
||||
table["contacts"] = contacts
|
||||
|
||||
|
||||
@ -273,7 +273,8 @@ void GroundUnit::AIloop()
|
||||
case State::SCENIC_AAA: {
|
||||
setTask("Scenic AAA");
|
||||
|
||||
if ((!getHasTask() || internalCounter == 0)) {
|
||||
/* Only perform scenic functions when the scheduler is "free" */
|
||||
if (((!getHasTask() && scheduler->getLoad() == 0) || internalCounter == 0)) {
|
||||
double distance = 0;
|
||||
unsigned char unitCoalition = coalition == 0 ? getOperateAs() : coalition;
|
||||
unsigned char targetCoalition = unitCoalition == 2 ? 1 : 2;
|
||||
@ -315,7 +316,8 @@ void GroundUnit::AIloop()
|
||||
canAAA = databaseEntry[L"canAAA"].as_bool();
|
||||
}
|
||||
|
||||
if (canAAA) {
|
||||
/* Only perform scenic functions when the scheduler is "free" */
|
||||
if (scheduler->getLoad() == 0 && canAAA) {
|
||||
/* Only run this when the internal counter reaches 0 to avoid excessive computations when no nearby target */
|
||||
if (internalCounter == 0) {
|
||||
double distance = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user