Skip to content

Commit

Permalink
working!!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed Feb 20, 2025
1 parent 572791b commit fb02985
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions OpenDreamClient/Rendering/ClientDreamParticlesSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ private ParticleSystemArgs GetParticleSystemArgs(DreamParticlesComponent compone
return Matrix3x2.CreateScale(scale.X + growth.X, scale.Y + growth.Y) *
Matrix3x2.CreateRotation(rotation + spin);
};
result.BaseTransform = Matrix3x2.Identity;

return result;
}
Expand Down
6 changes: 3 additions & 3 deletions OpenDreamClient/Rendering/DreamViewOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,10 @@ public void DrawIcon(DrawingHandleWorld handle, Vector2i renderTargetSize, Rende

if(iconMetaData.Particles is not null) {
foreach(var particleSystem in iconMetaData.Particles){
handle.UseShader(GetBlendAndColorShader(iconMetaData, ignoreColor: true));
handle.SetTransform(CalculateDrawingMatrix(iconMetaData.TransformToApply, pixelPosition-particleSystem.RenderSize/2, particleSystem.RenderSize, renderTargetSize));
particleSystem.Draw(handle, pixelPosition);
var renderTarget = _renderTargetPool.Rent(particleSystem.RenderSize);

handle.UseShader(GetBlendAndColorShader(iconMetaData, ignoreColor: true));
particleSystem.Draw(handle, CalculateDrawingMatrix(iconMetaData.TransformToApply, pixelPosition, particleSystem.RenderSize, renderTargetSize));
}
}
//if frame is null, this doesn't require a draw, so return NOP
Expand Down
4 changes: 2 additions & 2 deletions OpenDreamShared/Rendering/DreamParticlesComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public sealed partial class DreamParticlesComponent : Component {
[ViewVariables(VVAccess.ReadWrite)] public Vector3 FrictionLow;
[ViewVariables(VVAccess.ReadWrite)] public ParticlePropertyType FrictionType;
//Scaling applied to the particles in (x,y)
[ViewVariables(VVAccess.ReadWrite)] public Vector2 ScaleHigh;
[ViewVariables(VVAccess.ReadWrite)] public Vector2 ScaleLow;
[ViewVariables(VVAccess.ReadWrite)] public Vector2 ScaleHigh = Vector2.One;
[ViewVariables(VVAccess.ReadWrite)] public Vector2 ScaleLow = Vector2.One;
[ViewVariables(VVAccess.ReadWrite)] public ParticlePropertyType ScaleType;
//Rotation applied to the particles in degrees
[ViewVariables(VVAccess.ReadWrite)] public float RotationHigh;
Expand Down
2 changes: 1 addition & 1 deletion RobustToolbox

0 comments on commit fb02985

Please sign in to comment.