- Joined
- Oct 13, 2018
- Messages
- 7
Guys, where is leak in this code?
Posting GUY -> JASS cuz my editor is in Russian.
function Trig_LocCamLock_JASS_Func001Func004Func003C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetEnumUnit()), udg_Inventory_Players) == false ) ) then
return false
endif
return true
endfunction
function Trig_LocCamLock_JASS_Func001Func004A takes nothing returns nothing
// Убираем из КамераПлеерс для лока камеры
call ForceRemovePlayerSimple( GetOwningPlayer(GetEnumUnit()), udg_CameraAnglePlayers )
if ( Trig_LocCamLock_JASS_Func001Func004Func003C() ) then
call CameraSetupApplyForPlayer( true, udg_rg_camlocking_cam[GetForLoopIndexA()], GetOwningPlayer(GetEnumUnit()), 0 )
else
endif
endfunction
function Trig_LocCamLock_JASS_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 500
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
// Устанавливаем Отряд [Массив] = Юниты в областях [Массив]
set udg_locations_system_unit_camgroup[GetForLoopIndexA()] = GetUnitsInRectAll(udg_rg_camlocking[GetForLoopIndexA()])
// Берем каждого юнита из Отрядов [Массив]
call ForGroupBJ( udg_locations_system_unit_camgroup[GetForLoopIndexA()], function Trig_LocCamLock_JASS_Func001Func004A )
call DestroyGroup( udg_locations_system_unit_camgroup[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_LocCamLock_JASS takes nothing returns nothing
set gg_trg_LocCamLock_JASS = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_LocCamLock_JASS, 0.05 )
call TriggerAddAction( gg_trg_LocCamLock_JASS, function Trig_LocCamLock_JASS_Actions )
endfunction
Russian GUI version:
Posting GUY -> JASS cuz my editor is in Russian.
function Trig_LocCamLock_JASS_Func001Func004Func003C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetEnumUnit()), udg_Inventory_Players) == false ) ) then
return false
endif
return true
endfunction
function Trig_LocCamLock_JASS_Func001Func004A takes nothing returns nothing
// Убираем из КамераПлеерс для лока камеры
call ForceRemovePlayerSimple( GetOwningPlayer(GetEnumUnit()), udg_CameraAnglePlayers )
if ( Trig_LocCamLock_JASS_Func001Func004Func003C() ) then
call CameraSetupApplyForPlayer( true, udg_rg_camlocking_cam[GetForLoopIndexA()], GetOwningPlayer(GetEnumUnit()), 0 )
else
endif
endfunction
function Trig_LocCamLock_JASS_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 500
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
// Устанавливаем Отряд [Массив] = Юниты в областях [Массив]
set udg_locations_system_unit_camgroup[GetForLoopIndexA()] = GetUnitsInRectAll(udg_rg_camlocking[GetForLoopIndexA()])
// Берем каждого юнита из Отрядов [Массив]
call ForGroupBJ( udg_locations_system_unit_camgroup[GetForLoopIndexA()], function Trig_LocCamLock_JASS_Func001Func004A )
call DestroyGroup( udg_locations_system_unit_camgroup[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_LocCamLock_JASS takes nothing returns nothing
set gg_trg_LocCamLock_JASS = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_LocCamLock_JASS, 0.05 )
call TriggerAddAction( gg_trg_LocCamLock_JASS, function Trig_LocCamLock_JASS_Actions )
endfunction
Russian GUI version:
