Skip to content

Commit b6d2e22

Browse files
author
hamstar0
committed
v2.1.0.1 - Fixed scale issue with holograms at varying zoom levels
1 parent e833aba commit b6d2e22

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Emitters/Definitions/HologramDefinition_Draw_Raw.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ public void DrawHologramRaw( SpriteBatch sb, Vector2 worldPos, bool isUI, Textur
3131
scrPos = worldPos - Main.screenPosition;
3232
scrPos.X += this.OffsetX;
3333
scrPos.Y += this.OffsetY;
34-
scrPos = UIZoomHelpers.ApplyZoomFromScreenCenter( scrPos, isUI ? (bool?)true : null, false, null, null );
34+
scrPos = UIZoomHelpers.ApplyZoomFromScreenCenter(
35+
value: scrPos,
36+
uiZoomState: isUI ? (bool?)true : null,
37+
gameZoomState: null,
38+
uiZoomStateForCenterOffset: null,
39+
gameZoomStateForCenterOffset: null
40+
);
3541

3642
if( this.Direction == -1 ) {
3743
effects = SpriteEffects.FlipHorizontally;
@@ -45,7 +51,7 @@ public void DrawHologramRaw( SpriteBatch sb, Vector2 worldPos, bool isUI, Textur
4551
color: color,
4652
rotation: MathHelper.ToRadians( this.Rotation ),
4753
origin: isUI ? default(Vector2) : origin,
48-
scale: this.Scale * Main.GameZoomTarget,
54+
scale: this.Scale,// * Main.GameZoomTarget,
4955
effects: effects,
5056
layerDepth: 1f
5157
);

Emitters/build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
displayName = Emitters
22
author = hamstar
3-
version = 2.1.0
3+
version = 2.1.0.1
44
modReferences = HamstarHelpers@5.8.1
55
buildIgnore = *.csproj, *.user, *.bat, obj\*, bin\*, .vs\*, .git\*
66
homepage = https://forums.terraria.org/index.php?threads/emitters.87584/

0 commit comments

Comments
 (0)