* More assorted console cleaning

zircon^2
Adam Frisby 2007-06-05 13:00:57 +00:00
parent 1e716260c8
commit f1e231e4ba
3 changed files with 7 additions and 14 deletions

View File

@ -244,7 +244,7 @@ namespace OpenSim.GridInterfaces.Local
}
catch (Exception e)
{
Console.WriteLine(e.Message);
MainConsole.Instance.Error(e.Message);
}
}

View File

@ -20,11 +20,8 @@ namespace OpenSim.Scripting.EmbeddedJVM
{
case 184:
short refIndex = (short) ((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]);
//Console.WriteLine("call to method : "+refIndex);
if (this._mThread.currentClass._constantsPool[refIndex - 1] is ClassRecord.PoolMethodRef)
{
// Console.WriteLine("which is " + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value + "." + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value);
// Console.WriteLine("of type " + ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value);
string typ = ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value;
string typeparam = "";
string typereturn = "";
@ -34,7 +31,6 @@ namespace OpenSim.Scripting.EmbeddedJVM
secondbrak = typ.LastIndexOf(')');
typeparam = typ.Substring(firstbrak + 1, secondbrak - firstbrak - 1);
typereturn = typ.Substring(secondbrak + 1, typ.Length - secondbrak - 1);
//Console.WriteLine("split is " + typeparam + " which is length " + typeparam.Length + " , " + typereturn);
if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == this._mThread.currentClass.mClass.Name.Value)
{
//calling a method in this class
@ -72,12 +68,10 @@ namespace OpenSim.Scripting.EmbeddedJVM
BaseType bs1 = this._mThread.currentFrame.OpStack.Pop();
if (bs1 is Int)
{
//Console.WriteLine("get entity pos for " + ((Int)bs1).mValue);
//should get the position of the entity from the IScriptAPI
OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
Float pos = new Float();
pos.mValue = vec3.X;
// Console.WriteLine("returned x value " + vec3.X.ToString());
this._mThread.currentFrame.OpStack.Push(pos);
}
this._mThread.PC += 2;
@ -116,7 +110,6 @@ namespace OpenSim.Scripting.EmbeddedJVM
{
if(in1 is Int)
{
//Console.WriteLine("set: " + ((Int)in1).mValue + " , " + ((Float)ft1).mValue + " , " + ((Float)ft2).mValue + " , " + ((Float)ft3).mValue);
Thread.OpenSimScriptAPI.SetEntityPosition((uint)((Int) in1).mValue, ((Float)ft1).mValue, ((Float)ft2).mValue, ((Float)ft3).mValue);
}
}

View File

@ -208,10 +208,10 @@ namespace OpenSim
m_console.Notice("Main.cs:Startup() - Grid Mode; Do not know how to get the user's master key yet!");
}
Console.WriteLine("Creating ParcelManager");
m_console.Notice("Creating ParcelManager");
LocalWorld.parcelManager = new OpenSim.RegionServer.world.ParcelManager(this.LocalWorld);
Console.WriteLine("Loading Parcels from DB...");
m_console.Notice("Loading Parcels from DB...");
LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager);
m_heartbeatTimer.Enabled = true;
@ -359,7 +359,7 @@ namespace OpenSim
}
catch (Exception e)
{
m_console.Error(e.Message + "\nBAD ERROR! THIS SHOULD NOT HAPPEN! Bad GridData from the grid interface!!!! ZOMG!!!");
m_console.Error("Did not recieve valid information from the grid server. " + e.ToString());
Environment.Exit(1);
}
}
@ -460,9 +460,9 @@ namespace OpenSim
}
catch (Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine("\nSorry, a fatal error occurred while trying to initialise the configuration data");
Console.WriteLine("Can not continue starting up");
m_console.Error(e.Message);
m_console.Error("Sorry, a fatal error occurred while trying to initialise the configuration data");
m_console.Error("Can not continue starting up");
Environment.Exit(1);
}
}