From ab4c6baad099fb93c105abdd9f8b39400e6f608f Mon Sep 17 00:00:00 2001 From: Aristeas <94058548+Jnick-24@users.noreply.github.com> Date: Mon, 19 Feb 2024 19:43:45 -0600 Subject: [PATCH] Removed some old networking references --- .../Scripts/HeartModule/Projectiles/ProjectileManager.cs | 8 ++++---- .../Projectiles/ProjectileNetworking/ProjectileNetwork.cs | 4 ++-- .../Projectiles/StandardClasses/n_ProjectileRequest.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/ProjectileManager.cs b/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/ProjectileManager.cs index 6218969b..539b9aae 100644 --- a/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/ProjectileManager.cs +++ b/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/ProjectileManager.cs @@ -61,8 +61,8 @@ public override void UpdateAfterSimulation() foreach (var projectile in QueuedCloseProjectiles) { //MyAPIGateway.Utilities.ShowMessage("Heart", $"Closing projectile {projectile.Id}. Age: {projectile.Age} "); - if (MyAPIGateway.Session.IsServer) - QueueSync(projectile, 2); + //if (MyAPIGateway.Session.IsServer) + // QueueSync(projectile, 2); if (!MyAPIGateway.Utilities.IsDedicated) projectile.CloseDrawing(); @@ -77,7 +77,7 @@ public override void UpdateAfterSimulation() QueuedCloseProjectiles.Clear(); // Sync stuff - UpdateSync(); + Network.Update1(); DamageHandler.Update(); @@ -167,7 +167,7 @@ internal Projectile AddProjectile(Projectile projectile) projectile.SetId(NextId); ActiveProjectiles.Add(projectile.Id, projectile); if (MyAPIGateway.Session.IsServer) - QueueSync(projectile, 0); + Network.QueueSync_PP(projectile, 0); if (!MyAPIGateway.Utilities.IsDedicated) projectile.InitEffects(); if (projectile.Definition.PhysicalProjectile.Health > 0 && projectile.Definition.PhysicalProjectile.ProjectileSize > 0) diff --git a/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/ProjectileNetworking/ProjectileNetwork.cs b/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/ProjectileNetworking/ProjectileNetwork.cs index e705314b..8cc85e4a 100644 --- a/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/ProjectileNetworking/ProjectileNetwork.cs +++ b/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/ProjectileNetworking/ProjectileNetwork.cs @@ -23,10 +23,10 @@ public class ProjectileNetwork private Dictionary> SyncStream_PP = new Dictionary>(); private Dictionary> SyncStream_FireEvent = new Dictionary>(); - public void QueueSync_PP(Projectile projectile) + public void QueueSync_PP(Projectile projectile, int detailLevel = 0) { foreach (var player in HeartData.I.Players) - QueueSync_PP(player, projectile); + QueueSync_PP(player, projectile, detailLevel); } public void QueueSync_PP(IMyPlayer player, Projectile projectile, int detailLevel = 0) diff --git a/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/StandardClasses/n_ProjectileRequest.cs b/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/StandardClasses/n_ProjectileRequest.cs index 66265a52..3d4253a1 100644 --- a/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/StandardClasses/n_ProjectileRequest.cs +++ b/Orrery Combat Framework - Heart Module/Data/Scripts/HeartModule/Projectiles/StandardClasses/n_ProjectileRequest.cs @@ -25,7 +25,7 @@ public override void Received(ulong SenderSteamId) { IMyPlayer player = HeartUtils.GetPlayerFromSteamId(SenderSteamId); if (player != null) - ProjectileManager.I.QueueSync(p, player, 0); + ProjectileManager.I.Network.QueueSync_PP(player, p, 0); } } }