diff --git a/.all-contributorsrc b/.all-contributorsrc index f141644b..8066f717 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -77,6 +77,15 @@ "code", "doc" ] + }, + { + "login": "Retrograde-i486", + "name": "Retrograde-i486", + "avatar_url": "https://avatars1.githubusercontent.com/u/65242258?v=4", + "profile": "https://github.com/Retrograde-i486", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/CHANGELOG.md b/CHANGELOG.md index b1b41e05..612bfb4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large. -## Upcoming changes +## TShock 4.4.0 (Pre-release 4) * Debug logging now provides ConsoleDebug and ILog has been updated to support the concept of debug logs. Debug logs are now controlled by `config.json` instead of by preprocessor debug flag. (@hakusaro) * Removed `/confuse` command and Terraria player data resync from @Zidonuke. (@hakusaro) +* Attempted to fix the player desync issue by changing `LastNetPosition` logic and disabling a check in Bouncer that would normally reject player update packets from players. (@QuiCM, @hakusaro) ## TShock 4.4.0 (Pre-release 3) * Fixed `/worldmode` command to correctly target world mode. (@Ristellise) diff --git a/README.md b/README.md index 257df430..abdb437d 100644 --- a/README.md +++ b/README.md @@ -264,6 +264,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Nathan Easton

💻
Shinon

⚠️ 💻 📖 + +
Retrograde-i486

💻 + diff --git a/README_cn.md b/README_cn.md index 7ede26da..caed48cb 100644 --- a/README_cn.md +++ b/README_cn.md @@ -80,6 +80,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Nathan Easton

💻
Shinon

⚠️ 💻 📖 + +
Retrograde-i486

💻 + diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 1c64448e..a0a5dee9 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -122,9 +122,9 @@ namespace TShockAPI if (args.Player.LastNetPosition == Vector2.Zero) { - TShock.Log.ConsoleDebug("Bouncer / OnPlayerUpdate rejected from (last network position) {0}", args.Player.Name); - args.Handled = true; - return; + TShock.Log.ConsoleInfo("Bouncer / OnPlayerUpdate *would have rejected* from (last network position zero) {0}", args.Player.Name); + // args.Handled = true; + // return; } if (!pos.Equals(args.Player.LastNetPosition)) @@ -184,6 +184,7 @@ namespace TShockAPI } } + args.Player.LastNetPosition = pos; return; } diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 5d2c2912..d32e1155 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -5012,7 +5012,7 @@ namespace TShockAPI args.Player.SendSuccessMessage("Your new account has been verified, and the {0}setup system has been turned off.", Specifier); args.Player.SendSuccessMessage("You can always use the {0}user command to manage players.", Specifier); args.Player.SendSuccessMessage("The setup system will remain disabled as long as a superadmin exists (even if you delete setup.lock)."); - args.Player.SendSuccessMessage("Share your server, talk with other admins, and more on our forums -- https://tshock.co/"); + args.Player.SendSuccessMessage("Share your server, talk with other admins, and more on GitHub! -- https://tshock.co/"); args.Player.SendSuccessMessage("Thank you for using TShock for Terraria!"); FileTools.CreateFile(Path.Combine(TShock.SavePath, "setup.lock")); File.Delete(Path.Combine(TShock.SavePath, "setup-code.txt")); diff --git a/TShockAPI/SqlLog.cs b/TShockAPI/SqlLog.cs index a0fd4493..599a9de8 100644 --- a/TShockAPI/SqlLog.cs +++ b/TShockAPI/SqlLog.cs @@ -211,8 +211,11 @@ namespace TShockAPI /// The message to be written. public void ConsoleDebug(string message) { - Console.WriteLine("Debug: " + message); - Write(message, TraceLevel.Verbose); + if (TShock.Config.DebugLogs) + { + Console.WriteLine("Debug: " + message); + Write(message, TraceLevel.Verbose); + } } /// diff --git a/TShockAPI/TextLog.cs b/TShockAPI/TextLog.cs index 349ceb01..33dcb936 100644 --- a/TShockAPI/TextLog.cs +++ b/TShockAPI/TextLog.cs @@ -178,8 +178,11 @@ namespace TShockAPI /// The message to be written. public void ConsoleDebug(string message) { - Console.WriteLine("Debug: " + message); - Write(message, TraceLevel.Verbose); + if (TShock.Config.DebugLogs) + { + Console.WriteLine("Debug: " + message); + Write(message, TraceLevel.Verbose); + } } ///