You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.2 KiB
45 lines
1.2 KiB
#if 0
|
|
//--------------------------------------------//
|
|
// 本文件为自动生成,请勿编辑 //
|
|
// thanks to 最萌小汐 //
|
|
//--------------------------------------------//
|
|
#endif
|
|
#ifdef USE_BJ_ANTI_LEAK
|
|
#ifndef YDWEPauseAllUnitsBJNullIncluded
|
|
#define YDWEPauseAllUnitsBJNullIncluded
|
|
|
|
|
|
library YDWEPauseAllUnitsBJNull
|
|
|
|
function YDWEPauseAllUnitsBJNull takes boolean pause returns nothing
|
|
local integer index
|
|
local player indexPlayer
|
|
local group g
|
|
|
|
set bj_pauseAllUnitsFlag = pause
|
|
set g = CreateGroup()
|
|
set index = 0
|
|
loop
|
|
set indexPlayer = Player( index )
|
|
|
|
// If this is a computer slot, pause/resume the AI.
|
|
if (GetPlayerController( indexPlayer ) == MAP_CONTROL_COMPUTER) then
|
|
call PauseCompAI( indexPlayer, pause )
|
|
endif
|
|
|
|
// Enumerate and unpause every unit owned by the player.
|
|
call GroupEnumUnitsOfPlayer( g, indexPlayer, null )
|
|
call ForGroup( g, function PauseAllUnitsBJEnum )
|
|
call GroupClear( g )
|
|
|
|
set index = index + 1
|
|
exitwhen index == bj_MAX_PLAYER_SLOTS
|
|
endloop
|
|
call DestroyGroup(g)
|
|
set g = null
|
|
endfunction
|
|
|
|
endlibrary
|
|
|
|
#endif
|
|
#endif
|
|
|