From 12f8c967fbe29329197c6a217d80e888119e8cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Thu, 19 Nov 2020 15:58:10 +0100 Subject: [PATCH] Make monsters shoot from middle --- game.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/game.h b/game.h index f072ee2..1d431a8 100755 --- a/game.h +++ b/game.h @@ -2270,10 +2270,13 @@ void SFG_monsterPerformAI(SFG_MonsterRecord *monster) currentHeight) ); + uint8_t spriteSize = SFG_GET_MONSTER_SPRITE_SIZE( + SFG_MONSTER_TYPE_TO_INDEX(SFG_MR_TYPE(*monster))); + SFG_launchProjectile( projectile, pos, - currentHeight + RCL_UNITS_PER_SQUARE / 2, + currentHeight + SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(spriteSize), dir, 0, SFG_PROJECTILE_SPAWN_OFFSET