unmovable_cmd.c
branch0.4.5
changeset 9944 4f027626dbf6
parent 2893 a234907badf7
--- a/unmovable_cmd.c	Wed Mar 22 11:11:52 2006 +0000
+++ b/unmovable_cmd.c	Wed Mar 22 11:13:20 2006 +0000
@@ -182,12 +182,16 @@
 
 static uint GetSlopeZ_Unmovable(const TileInfo* ti)
 {
-	return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
+	if (_m[ti->tile].m5 == 3) {
+		return ti->z + GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh);
+	} else {
+		return ti->z + (ti->tileh == 0 ? 0 : 8);
+	}
 }
 
 static uint GetSlopeTileh_Unmovable(const TileInfo *ti)
 {
-	return 0;
+	return _m[ti->tile].m5 == 3 ? ti->tileh : 0;
 }
 
 static int32 ClearTile_Unmovable(TileIndex tile, byte flags)