From 5a2ffa29a735ca76d9f376874054800895f9ffd4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 2 Sep 2016 22:46:43 -0400 Subject: [PATCH] v0.4.2: fixed visual weirdness involving halos --- .../shatteredpixeldungeon/effects/Halo.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Halo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Halo.java index 4386cbc61..0cbf2f140 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Halo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Halo.java @@ -23,6 +23,8 @@ package com.shatteredpixel.shatteredpixeldungeon.effects; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; + +import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.watabou.gltextures.SmartTexture; import com.watabou.gltextures.TextureCache; import com.watabou.noosa.Image; @@ -51,8 +53,6 @@ public class Halo extends Image { } texture( CACHE_KEY ); - - origin.set( RADIUS ); } public Halo( float radius, int color, float brightness ) { @@ -65,8 +65,9 @@ public class Halo extends Image { } public Halo point( float x, float y ) { - this.x = x - RADIUS; - this.y = y - RADIUS; + this.x = x - (width()/2f); + this.y = y - (height()/2f); + PixelScene.align(this); return this; }