Fix rain (Thanks goodlyay)

This commit is contained in:
UnknownShadow200 2016-04-24 13:55:36 +10:00
parent 4a20cad4e0
commit 0cc3d97ff6
3 changed files with 4 additions and 6 deletions

View File

@ -27,6 +27,7 @@ namespace ClassicalSharp.Gui {
public override void Init() { public override void Init() {
float textScale = game.Drawer2D.UseBitmappedChat ? 1.25f : 1; float textScale = game.Drawer2D.UseBitmappedChat ? 1.25f : 1;
int fontSize = (int)(12 * game.GuiChatScale * textScale); int fontSize = (int)(12 * game.GuiChatScale * textScale);
fontSize = Utils.CeilDiv( fontSize, 8 ) * 8;
Utils.Clamp( ref fontSize, 8, 60 ); Utils.Clamp( ref fontSize, 8, 60 );
chatFont = new Font( game.FontName, fontSize ); chatFont = new Font( game.FontName, fontSize );
chatBoldFont = new Font( game.FontName, fontSize, FontStyle.Bold ); chatBoldFont = new Font( game.FontName, fontSize, FontStyle.Bold );

View File

@ -42,7 +42,7 @@
<DebugType>None</DebugType> <DebugType>None</DebugType>
<Optimize>True</Optimize> <Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE;</DefineConstants> <DefineConstants>TRACE;__MonoCS__</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> <BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<StartAction>Project</StartAction> <StartAction>Project</StartAction>
</PropertyGroup> </PropertyGroup>

View File

@ -19,6 +19,8 @@ namespace ClassicalSharp.Renderers {
graphics = game.Graphics; graphics = game.Graphics;
info = game.BlockInfo; info = game.BlockInfo;
weatherVb = graphics.CreateDynamicVb( VertexFormat.P3fT2fC4b, vertices.Length ); weatherVb = graphics.CreateDynamicVb( VertexFormat.P3fT2fC4b, vertices.Length );
game.WorldEvents.OnNewMap += OnNewMap;
game.WorldEvents.OnNewMapLoaded += OnNewMapLoaded;
} }
int weatherVb; int weatherVb;
@ -113,11 +115,6 @@ namespace ClassicalSharp.Renderers {
} }
} }
public void Init() {
game.WorldEvents.OnNewMap += OnNewMap;
game.WorldEvents.OnNewMapLoaded += OnNewMapLoaded;
}
public void Dispose() { public void Dispose() {
game.WorldEvents.OnNewMap -= OnNewMap; game.WorldEvents.OnNewMap -= OnNewMap;
game.WorldEvents.OnNewMapLoaded -= OnNewMapLoaded; game.WorldEvents.OnNewMapLoaded -= OnNewMapLoaded;