Consistently give responsibility for thread sleeping to behaviours rather than controlling from the main action loop

This is to avoid excessive and inconsistent delays between behaviours that currently need to embed sleeps in other actions (e.g. physics) and other behaviours.
Might need a more sophisticated approach in the long term.
This commit is contained in:
Justin Clark-Casey (justincc)
2013-09-03 19:41:12 +01:00
parent 3dbe7313d1
commit 76bd2e2d72
3 changed files with 7 additions and 1 deletions

View File

@@ -282,7 +282,7 @@ namespace pCampBot
{
foreach (IBehaviour behaviour in Behaviours.Values)
{
Thread.Sleep(Random.Next(3000, 10000));
// Thread.Sleep(Random.Next(3000, 10000));
// m_log.DebugFormat("[pCAMPBOT]: For {0} performing action {1}", Name, b.GetType());
behaviour.Action();