Repository navigation
Update TSAPI for Terraria 1.4.6.0 (OTAPI 3.3.15) - #286
KRWCLASSIC wants to merge 1 commit into
Conversation
|
Found two issues while testing this on Windows and Linux: ServerLeave never fires on 1.4.6 In 1.4.6 // TerrariaServerAPI/TerrariaApi.Server/Hooking/ServerHooks.cs
-if (client.IsActive)
+if (client.Status != RemoteClient.ConnStatus.Free)
{
_hookManager.InvokeServerLeave(client.Id);
}Server crashes if GNS_Wrapper can't load If the native or one of its deps is missing (e.g. an old OpenSSL on the host), Btw, I think dont need #284 in 1.4.6 cause PendingTermination was removed in this PR. Update on the ServerLeave fix above: checking Status != Free in Reset makes it fire, but too late. 1.4.6 calls ApproveTermination() before Reset(), and that sets State = 0, so TShock's InsertPlayerData returns early (State < Complete) and SSC inventories are never saved on leave. Firing ServerLeave from ApproveTermination instead keeps the state intact, like 1.4.5.8: magaflaca@ddd66f2 Tested (SSC inventory saved and restored on relog) and confirmed working on another server running SSC. Thanks kobo_pace for testing in this too. |
SignatureBeef
left a comment
There was a problem hiding this comment.
Quick review - has some stray changes, but I welcome termination changes...nice.
That said the change to OnConnectionAccepted likely needs more work, as well as an improved PR description as to why its removed - would go a long way for others when considering for merging.
| @@ -1,4 +1,4 @@ | |||
| using OTAPI; | |||
| using OTAPI; | |||
| _hookManager = hookManager; | ||
|
|
||
| HookEvents.Terraria.NetMessage.greetPlayer += OnGreetPlayer; | ||
| HookEvents.Terraria.Netplay.OnConnectionAccepted += OnConnectionAccepted; |
There was a problem hiding this comment.
OnConnectionAccepted likely needs to go now as well, right? Since vanilla has changed how this works entirely - but an explanation of why this was removed would have been great.
| @@ -1,4 +1,4 @@ | |||
| using Microsoft.Xna.Framework; | |||
| using Microsoft.Xna.Framework; | |||
There was a problem hiding this comment.
more unneeded changed lines?
| <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> | ||
| <PackageReference Include="System.Diagnostics.PerformanceCounter" Version="9.0.0" /> | ||
| <PackageReference Include="OTAPI.Upcoming" Version="3.3.14" /> | ||
| <PackageReference Include="OTAPI.Upcoming" Version="3.3.15" /> |
There was a problem hiding this comment.
When addressing the others, can you bump to 3.3.18 while you're at it?
Updates TSAPI for Terraria 1.4.6.0 (depends on the OTAPI PR): bumps OTAPI to
3.3.15, adds packet165, and fixes theRemoteClient/ connection acceptance changes.