mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 11:42:38 +03:00
Fix micro lags when zombies and bloodsuckers spawn
Creating and deleting a dummy agent before the player is able to play, fix the micro lag problem. Thanks to iben
This commit is contained in:
@@ -626,6 +626,23 @@ class FSM
|
||||
"};" \n
|
||||
"" \n
|
||||
"_model call player_switchModel;" \n
|
||||
"" \n
|
||||
"[] spawn {" \n
|
||||
" // Dummy agent has to be created with 'NONE' (suitable empty position near given position)." \n
|
||||
"" \n
|
||||
" // Create zombie" \n
|
||||
" local _dummyZed = createAgent ['z_priest', [0,0,5000], [], 0, 'NONE'];" \n
|
||||
" local _dummyBloodSucker = objNull;" \n
|
||||
"" \n
|
||||
" if (DZE_Bloodsuckers) then {" \n
|
||||
" // Create mutant" \n
|
||||
" _dummyBloodSucker = createAgent ['z_bloodsucker', [0,0,5000], [], 0, 'NONE'];" \n
|
||||
" };" \n
|
||||
"" \n
|
||||
" uiSleep 5;" \n
|
||||
"" \n
|
||||
" {if (!isNull _x) then {deleteVehicle _x}} forEach [_dummyZed, _dummyBloodSucker];" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"_lastAte = _survival select 1;" \n
|
||||
"_lastDrank = _survival select 2;" \n
|
||||
|
||||
Reference in New Issue
Block a user