Raised This Month: $ Target: $400
 0% 

set_task(0.01, "func", id) question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-05-2011 , 20:49   Re: set_task(0.01, "func", id) question
Reply With Quote #10

Code:
void C_StartFrame_Post(void)
{
	if (g_task_time > gpGlobals->time)
		RETURN_META(MRES_IGNORED);

	g_task_time = gpGlobals->time + 0.1f;
	g_tasksMngr.startFrame();

	RETURN_META(MRES_IGNORED);
}
the reason why amxx limit task check frequency to 0.1s is that it's in server_frame, if every frame it loops all task list to find your task is ready to run, that cost a lot of cpu indeed.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode