Don't reload parallax prototypes unless necessary (#14763)
This commit is contained in:
parent
b4502757a5
commit
776d2df6bd
|
|
@ -1,3 +1,4 @@
|
|||
using Content.Client.Parallax.Data;
|
||||
using Content.Client.Parallax.Managers;
|
||||
using Content.Shared.Parallax;
|
||||
using Robust.Client.Graphics;
|
||||
|
|
@ -27,6 +28,9 @@ public sealed class ParallaxSystem : SharedParallaxSystem
|
|||
|
||||
private void OnReload(PrototypesReloadedEventArgs obj)
|
||||
{
|
||||
if (!obj.ByType.ContainsKey(typeof(ParallaxPrototype)))
|
||||
return;
|
||||
|
||||
_parallax.UnloadParallax(Fallback);
|
||||
_parallax.LoadDefaultParallax();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue