MTA Eir/Functions/engineStreamingSetProperty
Эта функция изменяет поведение системы стриминга GTA:SA. Это может увеличить производительность игры для ваших пользовательских серверов. Изменение этих свойств затрагивает качество игрового процесса на всем сервере.
Syntax
bool engineStreamingSetProperty ( string propertyName, var propValue )
Arguments
- propertyName: the name of the streaming property you want to change
- propValue: value to pass to the property
Valid Properties
MTA:Eir/functions/engineStreamingSetProperty/validProps ru
Useful Media
- https://dl.dropboxusercontent.com/u/55896914/eir_resources/streaming_opt.zip - streaming debugging resource
- https://dl.dropboxusercontent.com/u/55896914/eir_resources/streaming_test.zip - streaming mode example resource
- http://youtu.be/sk8WsHwPgsU - showcase video
Returns
Returns true if valid arguments have been passed, false otherwise.
Examples
This snippet ultimatively fixes the world flickering.
engineStreamingSetProperty( "strictNodeDistrib", false ); engineStreamingSetProperty( "infiniteStreaming", true );
This snippet sets the Streaming GC system to sparse mode. In this mode only the preallocated amount of Streaming GC nodes is allowed. Keeping a low amount of Streaming nodes is interesting for performance optimizations.
engineStreamingSetProperty( "gcOnDemand", true ); engineStreamingSetProperty( "infiniteStreaming", false ); engineStreamingSetProperty( "strictNodeDistrib", true );
This snippet turns on fibered loading when the Streaming system is busy and leaves it that way for five seconds.
engineStreamingSetProperty( "isFibered", false ); local lastBusyTime = false; local fiberedDuration = 5000; addEventHandler( "onClientRender", root, function() local isBusy = engineGetStreamingInfo().isBusy; if ( isBusy ) then local now = getTickCount(); if not ( lastBusyTime ) then lastBusyTime = now; engineStreamingSetProperty( "isFibered", true ); end elseif ( lastBusyTime ) then if ( now - lastBusyTime > fiberedDuration ) then engineStreamingSetProperty( "isFibered", false ); end end end );
This snippet makes the world load very slow. Lag spikes cannot occur due to Streaming loading anymore.
engineStreamingSetProperty( "isFibered", true ); engineStreamingSetProperty( "fiberedPerfMult", 0 );