Pure classic mode should not intefere with normal mode settings. (Thanks FabTheZen)

This commit is contained in:
UnknownShadow200 2016-03-23 23:28:23 +11:00
parent a4e66f7145
commit d70851a1b9
10 changed files with 16 additions and 16 deletions

View File

@ -115,7 +115,7 @@ namespace ClassicalSharp {
MakeKeys( KeyBinding.Respawn, 5, 5, 150 );
widgets[index++] = MakeBack( false, titleFont,
(g, w) => g.SetNewScreen( new OptionsGroupScreen( g ) ) );
(g, w) => g.SetNewScreen( new ClassicOptionsScreen( g ) ) );
}
}

View File

@ -47,7 +47,7 @@ namespace ClassicalSharp {
}),
Make( 140, -50, "Auto close launcher", OnWidgetClick,
g => Options.GetBool( OptionsKey.AutoCloseLauncher, false ) ? "yes" : "no",
g => Options.GetBool( OptionsKey.AutoCloseLauncher, true ) ? "yes" : "no",
(g, v) => Options.Set( OptionsKey.AutoCloseLauncher, v == "yes" ) ),
Make( 140, 0, "Invert mouse", OnWidgetClick,

View File

@ -4,7 +4,7 @@
<ProjectGuid>{BEB1C785-5CAD-48FF-A886-876BF0A318D4}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>WinExe</OutputType>
<OutputType>Exe</OutputType>
<RootNamespace>ClassicalSharp</RootNamespace>
<AssemblyName>ClassicalSharp</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>

View File

@ -27,7 +27,9 @@ namespace ClassicalSharp {
this.game = game;
game.Events.ChatFontChanged += ChatFontChanged;
NamesMode = Options.GetEnum( OptionsKey.NamesMode, NameMode.AllNamesAndHovered );
if( game.PureClassicMode ) NamesMode = NameMode.HoveredOnly;
ShadowMode = Options.GetEnum( OptionsKey.EntityShadow, EntityShadow.None );
if( game.PureClassicMode ) ShadowMode = EntityShadow.None;
}
/// <summary> Performs a tick call for all player entities contained in this list. </summary>

View File

@ -36,10 +36,10 @@ namespace ClassicalSharp {
Hacks = new HacksComponent( game, this );
Hacks.SpeedMultiplier = Options.GetFloat( OptionsKey.Speed, 0.1f, 50, 10 );
Hacks.PushbackPlacing = Options.GetBool( OptionsKey.PushbackPlacing, false );
Hacks.PushbackPlacing = !game.PureClassicMode && Options.GetBool( OptionsKey.PushbackPlacing, false );
Hacks.NoclipSlide = Options.GetBool( OptionsKey.NoclipSlide, false );
Hacks.DoubleJump = Options.GetBool( OptionsKey.DoubleJump, false );
Hacks.Enabled = Options.GetBool( OptionsKey.HacksEnabled, true );
Hacks.DoubleJump = !game.PureClassicMode && Options.GetBool( OptionsKey.DoubleJump, false );
Hacks.Enabled = !game.PureClassicMode && Options.GetBool( OptionsKey.HacksEnabled, true );
InitRenderingData();
}

View File

@ -51,6 +51,7 @@ namespace ClassicalSharp {
Graphics.MakeGraphicsInfo();
Options.Load();
PureClassicMode = Options.GetBool( "mode-classic", false );
Players = new EntityList( this );
AcceptedUrls.Load(); DeniedUrls.Load();
ViewDistance = Options.GetInt( OptionsKey.ViewDist, 16, 4096, 512 );
@ -66,7 +67,6 @@ namespace ClassicalSharp {
UseClassicTabList = Options.GetBool( OptionsKey.UseClassicTabList, false );
UseClassicOptions = Options.GetBool( OptionsKey.UseClassicOptions, false );
AllowCustomBlocks = Options.GetBool( OptionsKey.AllowCustomBlocks, true );
PureClassicMode = Options.GetBool( "mode-classic", false );
UseCPE = Options.GetBool( OptionsKey.UseCPE, true );
AllowServerTextures = Options.GetBool( OptionsKey.AllowServerTextures, true );
@ -78,7 +78,7 @@ namespace ClassicalSharp {
ModelCache.InitCache();
AsyncDownloader = new AsyncDownloader( skinServer );
Drawer2D = new GdiPlusDrawer2D( Graphics );
Drawer2D.UseBitmappedChat = !Options.GetBool( OptionsKey.ArialChatFont, false );
Drawer2D.UseBitmappedChat = PureClassicMode || !Options.GetBool( OptionsKey.ArialChatFont, false );
ViewBobbing = Options.GetBool( OptionsKey.ViewBobbing, false );
ShowBlockInHand = Options.GetBool( OptionsKey.ShowBlockInHand, true );
InvertMouse = Options.GetBool( OptionsKey.InvertMouse, false );
@ -142,7 +142,7 @@ namespace ClassicalSharp {
MapBordersRenderer.Init();
Picking = new PickedPosRenderer( this );
AudioPlayer = new AudioPlayer( this );
ModifiableLiquids = Options.GetBool( OptionsKey.ModifiableLiquids, false );
ModifiableLiquids = !PureClassicMode && Options.GetBool( OptionsKey.ModifiableLiquids, false );
AxisLinesRenderer = new AxisLinesRenderer( this );
LoadIcon();
@ -161,6 +161,8 @@ namespace ClassicalSharp {
TabAutocomplete = Options.GetBool( OptionsKey.TabAutocomplete, false );
FontName = Options.Get( OptionsKey.FontName ) ?? "Arial";
if( PureClassicMode ) FontName = "Arial";
try {
using( Font f = new Font( FontName, 16 ) ) { }
} catch( Exception ) {

View File

@ -137,6 +137,7 @@ namespace ClassicalSharp {
lastOpcode = (PacketId)opcode;
Action handler = handlers[opcode];
lastPacket = DateTime.UtcNow;
Console.WriteLine( "IN " + lastOpcode );
if( handler == null )
throw new NotImplementedException( "Unsupported packet:" + (PacketId)opcode );

View File

@ -25,6 +25,7 @@ namespace ClassicalSharp {
Utils.LogDebug( "default.zip not found. Cannot start." );
return;
}
Console.BufferHeight = short.MaxValue - 10;
bool nullContext = true;
#if !USE_DX

View File

@ -124,10 +124,6 @@ namespace Launcher {
game.ClassicMode = !game.ClassicMode;
Options.Load();
Options.Set( "mode-classic", game.ClassicMode );
if( game.ClassicMode ) {
Options.Set( "namesmode", "AllNamesAndHovered" );
Options.Set( "gui-arialchatfont", "false" );
}
Options.Set( "nostalgia-customblocks", !game.ClassicMode );
Options.Set( "nostalgia-usecpe", !game.ClassicMode );
@ -135,8 +131,6 @@ namespace Launcher {
Options.Set( "nostalgia-classictablist", game.ClassicMode );
Options.Set( "nostalgia-classicoptions", game.ClassicMode );
Options.Set( "nostalgia-classicgui", true );
Options.Set( "hacksenabled", !game.ClassicMode );
Options.Set( "doublejump", false );
Options.Save();
game.MakeBackground();

View File

@ -58,7 +58,7 @@ namespace Launcher {
// Make sure if the client has changed some settings in the meantime, we keep the changes
if( !Options.Load() )
return;
shouldExit = Options.GetBool( OptionsKey.AutoCloseLauncher, false );
shouldExit = Options.GetBool( OptionsKey.AutoCloseLauncher, true );
if( data == null ) return;
Options.Set( "launcher-username", data.RealUsername );