set_task(0.01, "func", id) question
Hi, i have one question.
why no one use tast time 0.01? I try it, and it working good. I've heard that is impossible or something like that, put it is a possible and working when i test it in new game. Is it bad or something, crash the server? |
Re: set_task(0.01, "func", id) question
Task every 0.01 seconds cost a lot of CPU. That's so bad. :)
|
Re: set_task(0.01, "func", id) question
The minimal value is 0.1. If you write a value below, like 0.01, 0.1 will be used.
|
Re: set_task(0.01, "func", id) question
Quote:
|
Re: set_task(0.01, "func", id) question
Quote:
changed the task(0.1 to task(0.01 and that task was lot a faster. Then i tryed 0.001, this was faster than 0.01 and then 0.00001 that was same. |
Re: set_task(0.01, "func", id) question
You don't understand. There is a check inside the native code where you CAN'T go below 0.1.
If you still don't understand : Code:
|
Re: set_task(0.01, "func", id) question
Quote:
And no it wasn't faster. The compiler automatically converts it to 0.1 if the number is lower. |
Re: set_task(0.01, "func", id) question
1 Attachment(s)
I tested it with message Te_Dlight
when the task time is 0.1 then light does not blink light life byte was 2 and when i changed it 0.01 , just to testing then the light blink light life byte was also 2 then i edit the light life to 1 tested it also light blink Then i changed a task time 0.05 and light life byte was 1 then light does not blink and it was lot more faster then task 0.1 time. Mayby that code fail. Also i tested it what compile write in amxx whit hex reading. and result the task time what was 0.01 and i compiled in .amxx the task time was also 0.01. Sorry my bad english, I hope that you understand me. Edit: Tested now that on this plugin PHP Code:
http://forums.alliedmods.net/attachm...1&d=1323110519 0.01 time working fine. But one time frame is missing only, it must be 10 i think. So its a slower a little bit. Edit I Download amxmodx from http://www.amxmodx.org/downloads.php And first i looked the dll size and my amxmodx what i use in cs are smaller than http://www.amxmodx.org/downloads.php Then i test task 0.01 on new amxmodx on this plugin and result was 1 But if i use that task 0.01 it did not change it 0.1, its like little bit smaller value idk The lighting is faster 0.01 than 0.1 task time. Mayby the problem is that the script where i use 0.01 task time is very big. question 2, Why the amxmodx autors limit the task time? Is it bad to use it smaller value than 0.1? |
Re: set_task(0.01, "func", id) question
Quote:
|
Re: set_task(0.01, "func", id) question
Code:
void C_StartFrame_Post(void) |
| All times are GMT -4. The time now is 12:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.