Working NetworkingService without net vars

This commit is contained in:
Evil Factory
2026-02-07 18:22:19 -03:00
committed by Maplewheels
parent 87dc9be10e
commit ba10d9d031
15 changed files with 226 additions and 150 deletions
@@ -1,6 +1,7 @@
using Barotrauma.Extensions;
using Barotrauma.IO;
using Barotrauma.Items.Components;
using Barotrauma.LuaCs.Events;
using Barotrauma.Steam;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
@@ -603,7 +604,7 @@ namespace Barotrauma.Networking
{
ServerPacketHeader header = (ServerPacketHeader)inc.ReadByte();
GameMain.LuaCs.NetworkingService.NetMessageReceived(inc, header);
GameMain.LuaCs.EventService.PublishEvent<IEventServerRawNetMessageReceived>(p => p.OnReceivedServerNetMessage(inc, header));
if (roundInitStatus == RoundInitStatus.WaitingForStartGameFinalize
&& header is not (