Readd clipping code unintentionally circumvented when moving code around in r2917.
Now ill effects could be seen with this code gone, though. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2924 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
1d1e96fb4f
commit
984e291774
|
@ -822,6 +822,17 @@ static void drawTiles(iView *camera, iView *player)
|
||||||
&& tileScreenInfo[i][j].bWater
|
&& tileScreenInfo[i][j].bWater
|
||||||
&& TileNumber_tile(mapTile(playerXTile + j, playerZTile + i)->texture) != WATER_TILE)
|
&& TileNumber_tile(mapTile(playerXTile + j, playerZTile + i)->texture) != WATER_TILE)
|
||||||
{
|
{
|
||||||
|
//get distance of furthest corner
|
||||||
|
int zMax = MAX(tileScreenInfo[i][j].screen.z, tileScreenInfo[i + 1][j].screen.z);
|
||||||
|
zMax = MAX(zMax, tileScreenInfo[i + 1][j + 1].screen.z);
|
||||||
|
zMax = MAX(zMax, tileScreenInfo[i][j + 1].screen.z);
|
||||||
|
|
||||||
|
if (zMax < 0)
|
||||||
|
{
|
||||||
|
// clipped
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// the edge is in front of the water (which is drawn at z-index -1)
|
// the edge is in front of the water (which is drawn at z-index -1)
|
||||||
drawTerrainTile(i, j, TRUE);
|
drawTerrainTile(i, j, TRUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue