diff --git a/TShockAPI/Log.cs b/TShockAPI/Log.cs index f573c684..8263356b 100644 --- a/TShockAPI/Log.cs +++ b/TShockAPI/Log.cs @@ -117,7 +117,17 @@ namespace TShockAPI return; } - string caller = "TShock"; + StackTrace trace = new StackTrace(); + StackFrame frame = null; + + frame = trace.GetFrame(2); + + string caller = "TShock: "; + + if (frame != null && frame.GetMethod().DeclaringType != null) + { + caller += frame.GetMethod().DeclaringType.Name + ": "; + } _logWriter.WriteLine(string.Format("{0} - {1}: {2}: {3}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture), diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index a85bd8c5..fa4ca6f7 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -415,8 +415,8 @@ namespace TShockAPI { int oldSpawnX = Main.spawnTileX; int oldSpawnY = Main.spawnTileY; - Main.spawnTileX = x; - Main.spawnTileY = y; + Main.spawnTileX = x/16; + Main.spawnTileY = y/16; //Send only that player the new spawn point data NetMessage.SendData(7, ply, -1, "", 0, 0f, 0f, 0f); //Force them to respawn