Copy CopyToShaderParameters in SpriteComponent.CopyFrom.

Fixes dragging displacement-mapped mobs in SS14 making the displacement map visible.
This commit is contained in:
Pieter-Jan Briers
2024-05-01 23:45:58 +02:00
parent 35ab0b8cc8
commit 0f97f366a6
2 changed files with 11 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ END TEMPLATE-->
### Bugfixes
*None yet*
* `SpriteComponent.CopyFrom` now copies `CopyToShaderParameters` configuration.
### Other
@@ -63,7 +63,7 @@ END TEMPLATE-->
* `EntParentChangedMessage.OldMapId` is now an `EntityUid` instead of `MapId`
* `TransformSystem.DetachParentToNull()` is being renamed to `DetachEntity`
* The order in which `MoveEvent` handlers are invoked has been changed to prioritise engine subscriptions
* The order in which `MoveEvent` handlers are invoked has been changed to prioritise engine subscriptions
### New features
@@ -108,7 +108,7 @@ END TEMPLATE-->
### Breaking changes
* Refactor UserInterfaceSystem.
* Refactor UserInterfaceSystem.
- The API has been significantly cleaned up and standardised, most noticeably callers don't need to worry about TryGetUi and can rely on either HasUi, SetUiState, CloseUi, or OpenUi to handle their code as appropriate.
- Interface data is now stored via key rather than as a flat list which is a breaking change for YAML.
- BoundUserInterfaces can now be completely handled via Shared code. Existing Server-side callers will behave similarly to before.

View File

@@ -1681,6 +1681,8 @@ namespace Robust.Client.GameObjects
DirOffset = toClone.DirOffset;
_autoAnimated = toClone._autoAnimated;
RenderingStrategy = toClone.RenderingStrategy;
if (toClone.CopyToShaderParameters is { } copyToShaderParameters)
CopyToShaderParameters = new CopyToShaderParameters(copyToShaderParameters);
}
void ISerializationHooks.AfterDeserialization()
@@ -2155,6 +2157,12 @@ namespace Robust.Client.GameObjects
public object LayerKey = layerKey;
public string? ParameterTexture;
public string? ParameterUV;
public CopyToShaderParameters(CopyToShaderParameters toClone) : this(toClone.LayerKey)
{
ParameterTexture = toClone.ParameterTexture;
ParameterUV = toClone.ParameterUV;
}
}
void IAnimationProperties.SetAnimatableProperty(string name, object value)