Fix: flashbang effect in a building without flat roof

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8642 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2018-11-26 15:51:36 +00:00
parent d8ce2d312d
commit 389f40ba3d
+4 -1
View File
@@ -608,7 +608,10 @@ BUILDING * FindBuilding( INT32 sGridNo )
BOOLEAN InBuilding( INT32 sGridNo )
{
if ( FindBuilding( sGridNo ) == NULL )
// sevenfm: FindBuilding() only checks for buildings with flat roofs (those you can climb)
// since InBuilding() is used to determine flashbang effect, check also if tile is in a room and has any roof above
//if ( FindBuilding( sGridNo ) == NULL )
if (FindBuilding(sGridNo) || InARoom(sGridNo, NULL) && FindStructure(sGridNo, STRUCTURE_ROOF))
{
return( FALSE );
}