Skip to content

Commit

Permalink
Merge pull request #16 from x8c8r/fix-blurry-ghosts
Browse files Browse the repository at this point in the history
Make ghosts copy antialias from the main sprite
  • Loading branch information
DuskieWhy authored Nov 5, 2024
2 parents 801bece + d444be9 commit 5ff1390
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions source/gameObjects/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ class Character extends FlxSprite
{
super(x, y);

for(i in 0...4){
var ghost = new FlxSprite();
ghost.visible = false;
ghost.antialiasing = true;
ghost.alpha = 0.6;
doubleGhosts.push(ghost);
}

#if (haxe >= "4.0.0")
animOffsets = new Map();
#else
Expand All @@ -148,6 +140,14 @@ class Character extends FlxSprite
curCharacter = (ClientPrefs.darnell /*&& FlxG.save.data.KUTValue == 2*/) ? 'darnell' : character;
this.isPlayer = isPlayer;
antialiasing = ClientPrefs.globalAntialiasing;

for(i in 0...4){
var ghost = new FlxSprite();
ghost.visible = false;
ghost.alpha = 0.6;
doubleGhosts.push(ghost);
}

var library:String = null;
switch (curCharacter)
{
Expand Down Expand Up @@ -544,6 +544,7 @@ class Character extends FlxSprite
ghost.flipX = flipX;
ghost.flipY = flipY;
ghost.alpha = alpha * 0.6;
ghost.antialiasing = antialiasing;
ghost.visible = true;
ghost.color = FlxColor.fromRGB(healthColorArray[0], healthColorArray[1], healthColorArray[2]);
ghost.animation.play(AnimName, Force, Reversed, Frame);
Expand Down Expand Up @@ -585,4 +586,4 @@ class Character extends FlxSprite
else
ghost.offset.set(0, 0);
}
}
}

0 comments on commit 5ff1390

Please sign in to comment.