diff --git a/TSOClient/tso.world/Components/3DFloorGeometry.cs b/TSOClient/tso.world/Components/3DFloorGeometry.cs index 8a7ab1e68..0ccd0d573 100644 --- a/TSOClient/tso.world/Components/3DFloorGeometry.cs +++ b/TSOClient/tso.world/Components/3DFloorGeometry.cs @@ -275,7 +275,7 @@ private Vector4 GetParallaxMatrix(WorldState state) } public void DrawFloor(GraphicsDevice gd, GrassEffect e, WorldZoom zoom, WorldRotation rot, List roommaps, HashSet floors, EffectPass pass, - Matrix? lightWorld = null, WorldState state = null, int minFloor = 0, bool screenAlignUV = false) + Matrix? lightWorld = null, WorldState state = null, int minFloor = 0, bool screenAlignUV = false, bool withCeilings = false) { bool is3D = state?.CameraMode == CameraRenderMode._3D; var parallax = WorldConfig.Current.Complex; @@ -290,7 +290,7 @@ public void DrawFloor(GraphicsDevice gd, GrassEffect e, WorldZoom zoom, WorldRot e.ScreenAlignUV = screenAlignUV; var baseRS = gd.RasterizerState; - if (lightWorld == null) + if (withCeilings) { gd.RasterizerState = RasterizerState.CullCounterClockwise; } @@ -495,7 +495,7 @@ public void DrawFloor(GraphicsDevice gd, GrassEffect e, WorldZoom zoom, WorldRot } gd.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, type.Value.GeomForOffset.Count * 2); - if (f > 1 && is3D && lightWorld == null) + if (f > 1 && is3D && withCeilings) { // Draw ceilings in 3D mode. gd.RasterizerState = RasterizerState.CullClockwise; diff --git a/TSOClient/tso.world/Components/Geometry/Modelled3DFloor.cs b/TSOClient/tso.world/Components/Geometry/Modelled3DFloor.cs index 6e35bbc9e..455cd94ea 100644 --- a/TSOClient/tso.world/Components/Geometry/Modelled3DFloor.cs +++ b/TSOClient/tso.world/Components/Geometry/Modelled3DFloor.cs @@ -63,9 +63,12 @@ protected void AppendTile(List inds, List verts, Mod var srcInds = tile.Indices; var indLength = srcInds.Length; - for (int i=0; i(); for (sbyte f = 0; f < world.Level; f++) floors.Add(f); var pass = Effect.CurrentTechnique.Passes[(_3d) ? 2 : WorldConfig.Current.PassOffset]; - Bp.FloorGeom.DrawFloor(device, Effect, world.Zoom, world.Rotation, world.Rooms.RoomMaps, floors, pass, state: world, screenAlignUV: !nonIso); + Bp.FloorGeom.DrawFloor(device, Effect, world.Zoom, world.Rotation, world.Rooms.RoomMaps, floors, pass, state: world, screenAlignUV: !nonIso, withCeilings: true); Effect.GrassShininess = 0.02f;// (float)0.25); pass.Apply();