Fix initialization

This commit is contained in:
Miloslav Číž 2020-12-24 21:31:09 +01:00
parent da489353b5
commit 3f2010dee6
1 changed files with 5 additions and 5 deletions

10
game.h
View File

@ -2250,11 +2250,11 @@ void SFG_monsterPerformAI(SFG_MonsterRecord *monster)
(attackType == SFG_MONSTER_ATTACK_MELEE) ||
(attackType == SFG_MONSTER_ATTACK_EXPLODE);
uint8_t monsterSquare[2] =
{
SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0]),
SFG_MONSTER_COORD_TO_SQUARES(monster->coords[1])
};
uint8_t monsterSquare[2];
/* because of cancerous C++ compilers that error on narrowing conversion in
{ } we init this way: */
monsterSquare[0] = SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0]);
monsterSquare[1] = SFG_MONSTER_COORD_TO_SQUARES(monster->coords[1]);
RCL_Unit currentHeight =
SFG_floorCollisionHeightAt(monsterSquare[0],monsterSquare[1]);