diff --git a/ClassicalSharp/2D/Drawing/GdiPlusDrawer2D.cs b/ClassicalSharp/2D/Drawing/GdiPlusDrawer2D.cs
index 73e8abb96..b9f46a500 100644
--- a/ClassicalSharp/2D/Drawing/GdiPlusDrawer2D.cs
+++ b/ClassicalSharp/2D/Drawing/GdiPlusDrawer2D.cs
@@ -37,7 +37,7 @@ namespace ClassicalSharp {
}
}
- [Obsolete]
+ [Obsolete("Method is not guaranteed to work on all platforms.")]
public override void DrawRoundedRect( FastColour colour, float radius, float x, float y, float width, float height ) {
GraphicsPath path = new GraphicsPath();
float x1 = x, y1 = y, x2 = x + width, y2 = y + height;
diff --git a/ClassicalSharp/2D/Drawing/IDrawer2D.cs b/ClassicalSharp/2D/Drawing/IDrawer2D.cs
index 7f3b6426f..82abb87fa 100644
--- a/ClassicalSharp/2D/Drawing/IDrawer2D.cs
+++ b/ClassicalSharp/2D/Drawing/IDrawer2D.cs
@@ -33,7 +33,7 @@ namespace ClassicalSharp {
/// Draws a 2D rectangle with rounded borders of the specified dimensions
/// at the specified coordinates in the currently bound bitmap.
- [Obsolete]
+ [Obsolete("Method is not guaranteed to work on all platforms.")]
public abstract void DrawRoundedRect( FastColour colour, float radius, float x, float y, float width, float height );
/// Clears the entire bound bitmap to the specified colour.
diff --git a/ClassicalSharp/Blocks/BlockInfo.cs b/ClassicalSharp/Blocks/BlockInfo.cs
index 022698a46..d21e435b0 100644
--- a/ClassicalSharp/Blocks/BlockInfo.cs
+++ b/ClassicalSharp/Blocks/BlockInfo.cs
@@ -159,10 +159,6 @@ namespace ClassicalSharp {
MaxBB[(int)id].Y = height;
}
- void SetBlocksLight( Block id, bool blocks ) {
- BlocksLight[(int)id] = blocks;
- }
-
void SetFullBright( Block id, bool emits ) {
FullBright[(int)id] = emits;
}
diff --git a/ClassicalSharp/Entities/EntityList.cs b/ClassicalSharp/Entities/EntityList.cs
index 02c7d99ab..3dbf41df1 100644
--- a/ClassicalSharp/Entities/EntityList.cs
+++ b/ClassicalSharp/Entities/EntityList.cs
@@ -110,9 +110,9 @@ namespace ClassicalSharp {
game.Events.ChatFontChanged -= ChatFontChanged;
}
- public byte GetClosetPlayer( LocalPlayer localP ) {
- Vector3 eyePos = localP.EyePosition;
- Vector3 dir = Utils.GetDirVector( localP.HeadYawRadians, localP.PitchRadians );
+ public byte GetClosetPlayer( Player src ) {
+ Vector3 eyePos = src.EyePosition;
+ Vector3 dir = Utils.GetDirVector( src.HeadYawRadians, src.PitchRadians );
float closestDist = float.PositiveInfinity;
byte targetId = 255;
diff --git a/ClassicalSharp/Math/IntersectionUtils.cs b/ClassicalSharp/Math/IntersectionUtils.cs
index 570707c6f..7714dd4c2 100644
--- a/ClassicalSharp/Math/IntersectionUtils.cs
+++ b/ClassicalSharp/Math/IntersectionUtils.cs
@@ -7,7 +7,7 @@ namespace ClassicalSharp {
public static class Intersection {
/// Calculates the intersection points of a ray and a rotated bounding box.
- internal static bool RayIntersectsRotatedBox( Vector3 origin, Vector3 dir, Player target, out float tMin, out float tMax ) {
+ internal static bool RayIntersectsRotatedBox( Vector3 origin, Vector3 dir, Entity target, out float tMin, out float tMax ) {
// This is the rotated AABB of the model we want to test for intersection
// *
// / \ we then perform a counter *---* and we can then do
@@ -72,10 +72,10 @@ namespace ClassicalSharp {
//http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/raytri/raytri.c
/// Calculates the intersection point of a ray and a triangle.
- public static bool RayTriangleIntersect( Vector3 orig, Vector3 dir, Vector3 p0, Vector3 p1, Vector3 p2, out Vector3 I ) {
+ public static bool RayTriangleIntersect( Vector3 orig, Vector3 dir, Vector3 p0, Vector3 p1, Vector3 p2, out Vector3 intersect ) {
Vector3 edge1 = p1 - p0;
Vector3 edge2 = p2 - p0;
- I = Vector3.Zero;
+ intersect = Vector3.Zero;
Vector3 p = Vector3.Cross( dir, edge2 );
float det = Vector3.Dot( edge1, p );
@@ -92,7 +92,7 @@ namespace ClassicalSharp {
if( v < 0 || u + v > 1 ) return false;
float t = Vector3.Dot( edge2, q ) * invDet;
- I = orig + dir * t;
+ intersect = orig + dir * t;
return t > 0.000001f;
}
}
diff --git a/ClassicalSharp/TexturePack/ZipReader.cs b/ClassicalSharp/TexturePack/ZipReader.cs
index 2e5cec271..8ca42b6f9 100644
--- a/ClassicalSharp/TexturePack/ZipReader.cs
+++ b/ClassicalSharp/TexturePack/ZipReader.cs
@@ -87,7 +87,7 @@ namespace ClassicalSharp.TexturePack {
void ReadCentralDirectory( BinaryReader reader, ZipEntry[] entries ) {
ZipEntry entry;
- entry.CentralHeaderOffset = (int)( reader.BaseStream.Position - 4 );
+ entry.CentralHeaderOffset = (int)(reader.BaseStream.Position - 4);
reader.ReadUInt16(); // OS
ushort versionNeeded = reader.ReadUInt16();
ushort flags = reader.ReadUInt16();
diff --git a/ClassicalSharp/Utils/Camera.cs b/ClassicalSharp/Utils/Camera.cs
index f9bfe35b4..45398e016 100644
--- a/ClassicalSharp/Utils/Camera.cs
+++ b/ClassicalSharp/Utils/Camera.cs
@@ -112,13 +112,7 @@ namespace ClassicalSharp {
UpdateMouseRotation();
}
- float HorLength( Vector3 v ) {
- return (float)Math.Sqrt( v.X * v.X + v.Z * v.Z );
- }
-
- protected float bobYOffset = 0;
- const float angle = 0.25f * Utils.Deg2Rad;
-
+ protected float bobYOffset = 0;
protected void CalcViewBobbing( double delta ) {
if( !game.ViewBobbing || !game.LocalPlayer.onGround ) {
tiltMatrix = Matrix4.Identity;
diff --git a/Launcher2/Gui/Drawer2DExt.cs b/Launcher2/Gui/Drawer2DExt.cs
index 7231de6f8..6f7d72e94 100644
--- a/Launcher2/Gui/Drawer2DExt.cs
+++ b/Launcher2/Gui/Drawer2DExt.cs
@@ -88,12 +88,5 @@ namespace Launcher2 {
n = (n << 13) ^ n;
return 1f - ((n * (n * n * 15731 + 789221) + 1376312589) & 0x7fffffff) / 1073741824f;
}
-
- static float SmoothNoise2D( int x, int y ) {
- float corners = (Noise( x - 1, y - 1 ) + Noise( x + 1, y - 1) +
- Noise( x - 1, y + 1 ) + Noise( x + 1, y + 1 )) / 16;
- float sides = (Noise( x - 1, y ) + Noise( x + 1, y ) + Noise( x, y - 1 ) + Noise( x, y + 1 )) / 8;
- return corners + sides + Noise(x, y) / 4;
- }
}
}
\ No newline at end of file
diff --git a/Launcher2/Program.cs b/Launcher2/Program.cs
index c90d90917..533c4a8c7 100644
--- a/Launcher2/Program.cs
+++ b/Launcher2/Program.cs
@@ -4,7 +4,7 @@ using ClassicalSharp;
namespace Launcher2 {
- internal sealed class Program {
+ internal static class Program {
public const string AppName = "ClassicalSharp Launcher 0.98.6";