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() {
float textScale = game.Drawer2D.UseBitmappedChat ? 1.25f : 1;
int fontSize = (int)(12 * game.GuiChatScale * textScale);
fontSize = Utils.CeilDiv( fontSize, 8 ) * 8;
Utils.Clamp( ref fontSize, 8, 60 );
chatFont = new Font( game.FontName, fontSize );
chatBoldFont = new Font( game.FontName, fontSize, FontStyle.Bold );

View File

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

View File

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