From: Mikko Rasa Date: Sun, 15 Jun 2014 08:44:53 +0000 (+0300) Subject: Keep the local network in the center X-Git-Url: http://git.tdb.fi/?p=netvis.git;a=commitdiff_plain;h=b7b1fdc12122e6573bb71b4435c06440a0677c2f Keep the local network in the center --- diff --git a/source/host.cpp b/source/host.cpp index c18f117..fca3a30 100644 --- a/source/host.cpp +++ b/source/host.cpp @@ -100,8 +100,9 @@ void Host::tick(const Msp::Time::TimeDelta &td) return; const map &hosts = netvis.get_hosts(); - float fx = -pos.x*0.1; - float fy = -pos.y*0.1; + float center_force = (local ? 0.5 : 0.1); + float fx = -pos.x*center_force; + float fy = -pos.y*center_force; for(map::const_iterator i=hosts.begin(); i!=hosts.end(); ++i) { if(i->second!=this)