Dark_DragonKing
Mr & Ms Pac-Man
- 23/7/08
- 217
- 0
Hiện nay do polledwait của blizzard có leak nên tui mún xài 1 polledwait mới, đó là =PolledWait2=. Mà không biết cái nào la tốt nhất. Bạn nào có thể chack gium cái được không.
Và ai có group system nào ngon co thể cho tui xin được không?
Vi khi pick unit ko phải la structure, hoăc là unit armor invul, magic immun, fly, unit dã chết thì mất khá nhiều thời gian.
Nếu có một library để call thi mới thực sự là nhanh
Thx trước nhìu
đêy nữafunction PolledWait2 takes real duration returns nothing
local real timeRemaining
local real st=TimerGetElapsed( bj_gameStartedTimer)
if st <= 0 then
set bj_gameStartedTimer = CreateTimer()
call TimerStart(bj_gameStartedTimer, 1000000, false, null)
endif
if (duration > 0) then
loop
set timeRemaining = duration - TimerGetElapsed( bj_gameStartedTimer) + st
exitwhen timeRemaining <= 0
if (timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD) then
call TriggerSleepAction(0.1 * timeRemaining)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
function Wait takes real duration returns nothing
local timer t
local real timeRemaining
if (duration > 0.00) then
set t = CreateTimer ()
call TimerStart (t,duration,false,null)
loop
set timeRemaining = TimerGetRemaining (t)
exitwhen timeRemaining <= 0.00
if (timeRemaining > 0.271828) then
call TriggerSleepAction (timeRemaining / 10.00)
else
call TriggerSleepAction (0.10)
endif
endloop
call PauseTimer (t)
call DestroyTimer (t)
endif
set t = null
endfunction
function PolledWait2 takes real duration returns nothing
local real timeRemaining
local real st = TimerGetElapsed(gametime)
if duration > 0. then
loop
set timeRemaining = duration - TimerGetElapsed(gametime) + st
exitwhen timeRemaining <= 0
if timeRemaining > 2.00 then
call TriggerSleepAction(0.1 * timeRemaining)
else
call TriggerSleepAction(0.0)
endif
endloop
endif
endfunction
Và ai có group system nào ngon co thể cho tui xin được không?
Vi khi pick unit ko phải la structure, hoăc là unit armor invul, magic immun, fly, unit dã chết thì mất khá nhiều thời gian.
Nếu có một library để call thi mới thực sự là nhanh
Thx trước nhìu

(trong HAVOC thì hoạt động tốt, ko có vấn đề gì)
