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-861f7616d084master
parent
3a11c25d54
commit
7b12081033
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue