From: Mikko Rasa Date: Sun, 25 Oct 2009 13:01:45 +0000 (+0000) Subject: Tick new and reappearing hosts a few times to put them in sensible locations X-Git-Url: http://git.tdb.fi/?p=netvis.git;a=commitdiff_plain;h=afc5702fb7a8cb7011886093cd4ea0357ce8abce Tick new and reappearing hosts a few times to put them in sensible locations --- diff --git a/source/netvis.cpp b/source/netvis.cpp index ff05507..3aff9cd 100644 --- a/source/netvis.cpp +++ b/source/netvis.cpp @@ -135,6 +135,8 @@ void NetVis::tick() { i->second->set_active(true); hosts.insert(*i); + for(unsigned j=0; j<100; ++j) + i->second->tick(100*Time::msec); disabled_hosts.erase(i++); } else if(i->second->get_activity()set_local(true); resolver->push(host); host->set_position(Vector2(rand()*400.0/RAND_MAX-200.0, rand()*400.0/RAND_MAX-200.0)); + for(unsigned j=0; j<100; ++j) + host->tick(100*Time::msec); hosts[a] = host; return *host; }