OpenMetaverse.NetworkManager.SetCurrentSim C# (CSharp) Method

SetCurrentSim() private method

private SetCurrentSim ( Simulator simulator, string seedcaps ) : void
simulator Simulator
seedcaps string
return void
        private void SetCurrentSim(Simulator simulator, string seedcaps)
        {
            if (simulator != CurrentSim)
            {
                Simulator oldSim = CurrentSim;
                lock (Simulators) CurrentSim = simulator; // CurrentSim is synchronized against Simulators

		        simulator.SetSeedCaps(seedcaps);

                // If the current simulator changed fire the callback
                if (OnCurrentSimChanged != null && simulator != oldSim)
                {
                    try { OnCurrentSimChanged(oldSim); }
                    catch (Exception e) { Logger.Log(e.Message, Helpers.LogLevel.Error, Client, e); }
                }
            }
        }