Jump to content
naught

AI Caching and Distribution System

Recommended Posts

3 hours ago, Ragnarok44fan said:

WHAT IT MEANS

 

#define is a preprocessor command that is used to define (!) config keywords. 

Share this post


Link to post
Share on other sites
4 hours ago, Harzach said:

 

#define is a preprocessor command that is used to define (!) config keywords.  

thanks,I know that this is a settings parameter,but I am interested in the meaning of the parameter  CACHE VEHICLE TIMEOUT   ?

If i increased the parameter but i not see any difference,no delay time,no any changes....."timeout" what is this?

Share this post


Link to post
Share on other sites
2 hours ago, Ragnarok44fan said:

"timeout" what is this?

 

Ah, sorry. That keyword is used in caching.sqf. As far as I can tell, it is only used to create a safety condition(?):

//SNIP

if ((count (crew _obj)) > 0) then { // Assume all crew will automatically cache
	private ["_group", "_endWait", "_res"];
	_group = group ((crew _obj) select 0);
	_endWait = diag_tickTime + CACHE_VEH_TIMEOUT;
	_res = false;
	while {true} do {
		if (isNull _obj || {!alive _obj} || {!local _obj}) exitWith {}; // Exit with failure
		_res = (count (crew _obj)) == 0;
		if (_res || {diag_tickTime > _endWait}) exitWith {}; // Final exit check, only possibility of true
		uisleep CACHE_MONITOR_DELAY;
	};
	if (_res) then {
		_cacheObj = true;
	};
} else {_cacheObj = true};

But for diag_tickTime > _endWait to evaluate true, CACHE_VEH_TIMEOUT would need to be defined as less than 0 - any value greater than 0 would evaluate false, so I'm not sure what the point of using any value other than 1 is. There are notes regarding the experimental nature of vehicle caching, so perhaps the keyword is not fully implemented. That or I am simply not understanding something, which is entirely possible, if not likely.

 

The author hasn't been on the forums for six years, so don't hold your breath waiting to hear their explanation.

Share this post


Link to post
Share on other sites
On 9/4/2023 at 7:01 PM, Harzach said:

 

Ah, sorry. That keyword is used in caching.sqf. As far as I can tell, it is only used to create a safety condition(?): 


//SNIP

if ((count (crew _obj)) > 0) then { // Assume all crew will automatically cache
	private ["_group", "_endWait", "_res"];
	_group = group ((crew _obj) select 0);
	_endWait = diag_tickTime + CACHE_VEH_TIMEOUT;
	_res = false;
	while {true} do {
		if (isNull _obj || {!alive _obj} || {!local _obj}) exitWith {}; // Exit with failure
		_res = (count (crew _obj)) == 0;
		if (_res || {diag_tickTime > _endWait}) exitWith {}; // Final exit check, only possibility of true
		uisleep CACHE_MONITOR_DELAY;
	};
	if (_res) then {
		_cacheObj = true;
	};
} else {_cacheObj = true};

But for diag_tickTime > _endWait to evaluate true, CACHE_VEH_TIMEOUT would need to be defined as less than 0 - any value greater than 0 would evaluate false, so I'm not sure what the point of using any value other than 1 is. There are notes regarding the experimental nature of vehicle caching, so perhaps the keyword is not fully implemented. That or I am simply not understanding something, which is entirely possible, if not likely. 

 

The author hasn't been on the forums for six years, so don't hold your breath waiting to hear their explanation. 

😂

maybe I'll write to him and ask

my tip is that there will be a delay time,possible the vehicle cache will be unlocked  later ,with this time when the vehicle reaches the uncached area (viewdistance + 250m factory defaults)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×