Fix exception when VVing non-networked components

The VV code forcibly dirties all components, which trips an assert for non-networked components.
This commit is contained in:
Pieter-Jan Briers
2024-01-07 04:22:38 +01:00
parent 2bf284bce8
commit 538418ea93

View File

@@ -97,7 +97,7 @@ namespace Robust.Server.ViewVariables
// Auto-dirty component. Only works when modifying a field that is directly on a component,
// Does not work for nested objects.
if (Object is Component comp)
if (Object is Component { NetSyncEnabled: true } comp)
EntityManager.Dirty(comp.Owner, comp);
}