sDisplay is a member variable from BASE_OBJECT, so don't bother casting tile->psObject to a STRUCTURE* or FEATURE* before using this member variable

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4917 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-05-04 15:04:07 +00:00
parent 3a11c25d54
commit 7b12081033
1 changed files with 2 additions and 3 deletions

View File

@ -131,9 +131,8 @@ static inline bool TileIsHighlighted(const MAPTILE* tile)
static inline bool TileHasTallStructure(const MAPTILE* tile)
{
return (TileHasStructure(tile)
&& ((STRUCTURE*)tile->psObject)->sDisplay.imd->max.y > TALLOBJECT_YMAX)
|| (TileHasFeature(tile)
&& ((FEATURE*)tile->psObject)->sDisplay.imd->max.y > TALLOBJECT_YMAX);
|| TileHasFeature(tile))
&& tile->psObject->sDisplay.imd->max.y > TALLOBJECT_YMAX;
}
static inline bool TileHasSmallStructure(const MAPTILE* tile)