Fixed wrappingwalls, fixed Level.GetCells returning the same cell multiple times, placing backgroundsprites based on level seed

This commit is contained in:
Regalis
2016-01-20 23:26:41 +02:00
parent 2761c4a610
commit 75b8e44d3c
6 changed files with 35 additions and 120 deletions

View File

@@ -182,6 +182,11 @@ namespace Barotrauma
{
for (int i = 0; i < 2; i++)
{
basicEffect.World = Matrix.CreateTranslation(new Vector3(level.WrappingWalls[side, i].Offset, 0.0f)) * cam.ShaderTransform
* Matrix.CreateOrthographic(GameMain.GraphicsWidth, GameMain.GraphicsHeight, -1, 1) * 0.5f;
basicEffect.CurrentTechnique.Passes[0].Apply();
graphicsDevice.SetVertexBuffer(level.WrappingWalls[side, i].BodyVertices);
graphicsDevice.DrawPrimitives(
@@ -203,6 +208,10 @@ namespace Barotrauma
for (int i = 0; i < 2; i++)
{
basicEffect.World = Matrix.CreateTranslation(new Vector3(level.WrappingWalls[side,i].Offset, 0.0f)) * cam.ShaderTransform
* Matrix.CreateOrthographic(GameMain.GraphicsWidth, GameMain.GraphicsHeight, -1, 1) * 0.5f;
basicEffect.CurrentTechnique.Passes[0].Apply();
graphicsDevice.SetVertexBuffer(level.WrappingWalls[side, i].WallVertices);
graphicsDevice.DrawPrimitives(