Quote:
Originally Posted by Hunter-Digital
Is there a reason for creating an entity ? For this trivial thing set_task() is enough 
|
It may seem like overkill to create a thinking entity versus just using set_task(). But I was thinking that if the task is not going to be called for 30-45 minutes, the CPU will be checking every cycle to see if its time to execute the task; creating an entity and setting nextthink to task time and be done with it seems like a cheaper approach. Will a difference be noticed using either, probably not, but IMO it is the proper\efficient way.
Quote:
Originally Posted by Hunter-Digital
Also, mp_timelimit could verry likely change during the game and it could also be 0, so I dunno if that prediction could help or hurt :}
A possibly needed thing would be to check against changelevel delays... a task could fail if the level changes right before the task should occur and init the plugin right after it should've occured, then it's just ommited.
|
There are a lot of "what ifs?" that can be thrown into just about any situation\condition in a plugin. What I put together is just a rough skeleton of how to execute a task at a particular time, the end-scripter can put in all of the checks.
__________________