Completely destroyed game
Looks like a lot more than just netcode is getting rewritten. Removing coroutines because there are better ways of handling asynchronous tasks, removing filestream because that's to be reimplemented later
This commit is contained in:
@@ -61,10 +61,10 @@ namespace Barotrauma
|
||||
get { return hull; }
|
||||
}
|
||||
|
||||
public FireSource(Vector2 worldPosition, Hull spawningHull = null, bool networkEvent=false)
|
||||
public FireSource(Vector2 worldPosition, Hull spawningHull = null)
|
||||
{
|
||||
hull = Hull.FindHull(worldPosition, spawningHull);
|
||||
if (hull == null || (!networkEvent && GameMain.Client!=null)) return;
|
||||
if (hull == null || (GameMain.Client!=null)) return;
|
||||
|
||||
if (fireSoundBasic==null)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ namespace Barotrauma
|
||||
fireSoundLarge = Sound.Load("Content/Sounds/firelarge.ogg");
|
||||
}
|
||||
|
||||
hull.AddFireSource(this, !networkEvent);
|
||||
hull.AddFireSource(this);
|
||||
|
||||
Submarine = hull.Submarine;
|
||||
|
||||
@@ -338,9 +338,9 @@ namespace Barotrauma
|
||||
if (size.X < 1.0f) Remove();
|
||||
}
|
||||
|
||||
public void Remove(bool isNetworkEvent = false)
|
||||
public void Remove()
|
||||
{
|
||||
if (!isNetworkEvent && GameMain.Client != null) return;
|
||||
if (GameMain.Client != null) return;
|
||||
|
||||
lightSource.Remove();
|
||||
|
||||
|
||||
@@ -343,13 +343,9 @@ namespace Barotrauma
|
||||
|
||||
}
|
||||
|
||||
public void AddFireSource(FireSource fireSource, bool createNetworkEvent = true)
|
||||
public void AddFireSource(FireSource fireSource)
|
||||
{
|
||||
fireSources.Add(fireSource);
|
||||
if (createNetworkEvent)
|
||||
{
|
||||
new Networking.NetworkEvent(Networking.NetworkEventType.ImportantEntityUpdate, this.ID, false);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(Camera cam, float deltaTime)
|
||||
@@ -446,7 +442,7 @@ namespace Barotrauma
|
||||
if (Math.Abs(lastSentVolume - volume) > FullVolume * 0.1f ||
|
||||
Math.Abs(lastSentOxygen - OxygenPercentage) > 5f)
|
||||
{
|
||||
new Networking.NetworkEvent(ID, false);
|
||||
|
||||
}
|
||||
|
||||
if (!update)
|
||||
@@ -545,7 +541,6 @@ namespace Barotrauma
|
||||
public void RemoveFire(FireSource fire)
|
||||
{
|
||||
fireSources.Remove(fire);
|
||||
new Networking.NetworkEvent(Networking.NetworkEventType.ImportantEntityUpdate, this.ID, false);
|
||||
}
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch, bool editing, bool back = true)
|
||||
|
||||
@@ -572,7 +572,6 @@ namespace Barotrauma
|
||||
|
||||
if (damage != sections[sectionIndex].damage && Math.Abs(sections[sectionIndex].lastSentDamage - damage)>5.0f)
|
||||
{
|
||||
new NetworkEvent(NetworkEventType.ImportantEntityUpdate, ID, false);
|
||||
//sections[sectionIndex].lastSentDamage = damage;
|
||||
}
|
||||
|
||||
|
||||
@@ -474,7 +474,6 @@ namespace Barotrauma
|
||||
|
||||
if (networkUpdateTimer < 0.0f)
|
||||
{
|
||||
new Networking.NetworkEvent(ID, false);
|
||||
networkUpdateTimer = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user