Add depth support to TileSet.
This commit is contained in:
@@ -68,12 +68,10 @@ namespace OpenRA.Graphics
|
||||
|
||||
public void Update(CPos cell, Sprite sprite)
|
||||
{
|
||||
var xy = sprite == null ? float2.Zero :
|
||||
worldRenderer.ScreenPosition(map.CenterOfCell(cell)) + sprite.Offset - 0.5f * sprite.Size;
|
||||
var xyz = sprite == null ? float3.Zero :
|
||||
worldRenderer.Screen3DPosition(map.CenterOfCell(cell)) + sprite.Offset - 0.5f * sprite.Size;
|
||||
|
||||
// TODO: Deal with sprite z offsets
|
||||
var z = worldRenderer.ScreenZPosition(map.CenterOfCell(cell), 0);
|
||||
Update(cell.ToMPos(map.Grid.Type), sprite, new float3(xy.X, xy.Y, z));
|
||||
Update(cell.ToMPos(map.Grid.Type), sprite, xyz);
|
||||
}
|
||||
|
||||
public void Update(MPos uv, Sprite sprite, float3 pos)
|
||||
|
||||
Reference in New Issue
Block a user