From d50f35d13e73b72eae1d744971657bd665aa1f33 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 31 May 2011 00:27:37 +0200 Subject: Hopefully fixed the particle offset when controlled by beings. Reviewed-by: Jaxad0127. Resolves issue: #345. --- src/actorsprite.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp index 68b92a1f..7208a91a 100644 --- a/src/actorsprite.cpp +++ b/src/actorsprite.cpp @@ -110,8 +110,15 @@ void ActorSprite::logic() } } + Map *map = Game::instance() ? Game::instance()->getCurrentMap() : 0; + float py = mPos.y; + if (map) + { + py += (float)map->getTileHeight() / 2; + } + // Update particle effects - mChildParticleEffects.moveTo(mPos.x, mPos.y); + mChildParticleEffects.moveTo(mPos.x, py); } void ActorSprite::actorLogic() -- cgit v1.2.3-70-g09d2