Changeset - r8498:34df52f8dd71
[Not reviewed]
master
0 1 0
smatz - 17 years ago 2008-02-06 22:59:31
smatz@openttd.org
(svn r12073) -Codechange: stop drawing trees a bit earlier when they are invisible
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/tree_cmd.cpp
Show inline comments
 
@@ -448,6 +448,9 @@ static void DrawTile_Trees(TileInfo *ti)
 

	
 
	DrawClearLandFence(ti);
 

	
 
	/* Do not draw trees when the invisible trees patch and transparency tree are set */
 
	if (IsTransparencySet(TO_TREES) && _patches.invisible_trees) return;
 

	
 
	z = ti->z;
 
	if (ti->tileh != SLOPE_FLAT) {
 
		z += 4;
 
@@ -482,8 +485,6 @@ static void DrawTile_Trees(TileInfo *ti)
 

	
 
	StartSpriteCombine();
 

	
 
	/* Do not draw trees when the invisible trees patch and transparency tree are set */
 
	if (!(IsTransparencySet(TO_TREES) && _patches.invisible_trees)) {
 
		TreeListEnt te[4];
 
		uint i;
 

	
 
@@ -519,7 +520,6 @@ static void DrawTile_Trees(TileInfo *ti)
 
			AddSortableSpriteToDraw(tep->image, tep->pal, ti->x + tep->x, ti->y + tep->y, 16 - tep->x, 16 - tep->y, 0x30, z, IsTransparencySet(TO_TREES), -tep->x, -tep->y);
 
			tep->image = 0;
 
		}
 
	}
 

	
 
	EndSpriteCombine();
 
}
0 comments (0 inline, 0 general)