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