From 5931f1d5391a64fb5ee71c81a8123bf46a268a9e Mon Sep 17 00:00:00 2001 From: SMUnlimited Date: Sat, 7 Dec 2024 14:43:49 +0000 Subject: [PATCH] Corrected sleep action as these specific jobs don't need to actually delay all other jobs --- Jobs/FOCUSFIRE_CONTROL.eai | 2 +- Jobs/MICRO_HERO.eai | 2 +- Jobs/RETREAT_CONTROL.eai | 2 +- common.eai | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jobs/FOCUSFIRE_CONTROL.eai b/Jobs/FOCUSFIRE_CONTROL.eai index c2bf016f1..95f155925 100644 --- a/Jobs/FOCUSFIRE_CONTROL.eai +++ b/Jobs/FOCUSFIRE_CONTROL.eai @@ -234,7 +234,7 @@ function FocusEnemyUnitsNearGroup takes group g returns nothing set u = FirstOfGroup(g) exitwhen u == null if (ModuloInteger(i, 200) == 0) then - call TQSleep(0.1) + call Sleep(0.1) endif set unit_life = GetUnitState(u, UNIT_STATE_LIFE) if unit_life > 0 and not IsUnitHidden(u) then diff --git a/Jobs/MICRO_HERO.eai b/Jobs/MICRO_HERO.eai index 451fe5d63..c7d73dcfd 100644 --- a/Jobs/MICRO_HERO.eai +++ b/Jobs/MICRO_HERO.eai @@ -42,7 +42,7 @@ function GetDensities takes location l, player p, real r returns nothing set u = FirstOfGroup(g) exitwhen u == null if (ModuloInteger(i, 200) == 0) then - call TQSleep(0.1) + call Sleep(0.1) endif if UnitAlive(u) then set ul = GetUnitLoc(u) diff --git a/Jobs/RETREAT_CONTROL.eai b/Jobs/RETREAT_CONTROL.eai index 12144127c..9fd70b5cd 100644 --- a/Jobs/RETREAT_CONTROL.eai +++ b/Jobs/RETREAT_CONTROL.eai @@ -164,7 +164,7 @@ if attack_running then exitwhen u == null set unit_strength = GetUnitStrength(u) if (ModuloInteger(i, 200) == 0) then - call TQSleep(0.1) + call Sleep(0.1) endif // set unit_life = GetUnitState(u, UNIT_STATE_LIFE) // set unit_mana = GetUnitState(u, UNIT_STATE_MANA) diff --git a/common.eai b/common.eai index 2d999c607..4351196d2 100644 --- a/common.eai +++ b/common.eai @@ -5252,7 +5252,7 @@ function ReleaseTQLock takes nothing returns nothing set tq_lock = true endfunction -// To run a sleep within the job thread, will delay all other jobs as well +// To run a sleep within the job thread, that will delay all other jobs as well function TQSleep takes real time returns nothing local integer i = 1 call GetTQLock()