Skip to content

Commit

Permalink
Removed some old networking references
Browse files Browse the repository at this point in the history
  • Loading branch information
ari-steas committed Feb 20, 2024
1 parent c4a1695 commit ab4c6ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -77,7 +77,7 @@ public override void UpdateAfterSimulation()
QueuedCloseProjectiles.Clear();

// Sync stuff
UpdateSync();
Network.Update1();

DamageHandler.Update();

Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public class ProjectileNetwork
private Dictionary<ulong, SortedList<ushort, Projectile>> SyncStream_PP = new Dictionary<ulong, SortedList<ushort, Projectile>>();
private Dictionary<ulong, SortedList<ushort, Projectile>> SyncStream_FireEvent = new Dictionary<ulong, SortedList<ushort, Projectile>>();

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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit ab4c6ba

Please sign in to comment.