Broken items can be repaired, fixed clients never removing firesources (causing the lights to stay after the flames have been extinguished)
This commit is contained in:
@@ -125,7 +125,7 @@ namespace Barotrauma
|
||||
- leftEdge;
|
||||
|
||||
fireSources[j].position.X = leftEdge;
|
||||
|
||||
|
||||
fireSources[i].Remove();
|
||||
}
|
||||
}
|
||||
@@ -304,6 +304,8 @@ namespace Barotrauma
|
||||
size.X -= extinquishAmount;
|
||||
|
||||
hull.Volume -= extinquishAmount;
|
||||
|
||||
if (GameMain.Client != null) return;
|
||||
|
||||
if (size.X < 1.0f) Remove();
|
||||
}
|
||||
@@ -337,13 +339,13 @@ namespace Barotrauma
|
||||
|
||||
hull.Volume -= extinquishAmount;
|
||||
|
||||
if (GameMain.Client != null) return;
|
||||
|
||||
if (size.X < 1.0f) Remove();
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
if (GameMain.Client != null) return;
|
||||
|
||||
lightSource.Remove();
|
||||
|
||||
if (basicSoundIndex > -1) Sounds.SoundManager.Stop(basicSoundIndex);
|
||||
|
||||
@@ -881,7 +881,11 @@ namespace Barotrauma
|
||||
newFire.Hull == null ? size : size * newFire.Hull.rect.Width,
|
||||
newFire.Size.Y);
|
||||
//ignore if the fire wasn't added to this room (invalid position)?
|
||||
if (!fireSources.Contains(newFire)) continue;
|
||||
if (!fireSources.Contains(newFire))
|
||||
{
|
||||
newFire.Remove();
|
||||
continue;
|
||||
}
|
||||
newFireSources.Add(newFire);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user