Keypad enter sends chat, double jump loads option and defaults to false, fly is not affected by speed multiplier (Thanks nyxzimus), control+backspace should not remove the space (Thanks FabTheZen), fixes #126.

This commit is contained in:
UnknownShadow200 2016-01-12 10:22:58 +11:00
parent cfa93e0eef
commit f4ce55cb5c
4 changed files with 8 additions and 6 deletions

View File

@ -276,7 +276,7 @@ namespace ClassicalSharp {
suppressNextPress = false;
if( HandlesAllInput ) { // text input bar
if( key == game.Mapping( KeyBinding.SendChat )
if( key == game.Mapping( KeyBinding.SendChat ) || key == Key.KeypadEnter
|| key == game.Mapping( KeyBinding.PauseOrExit ) ) {
HandlesAllInput = false;
if( game.CursorVisible )

View File

@ -105,6 +105,7 @@ namespace ClassicalSharp {
caretPos -= len;
if( caretPos < 0 ) caretPos = 0;
if( caretPos != 0 ) caretPos++; // Don't remove space.
for( int i = 0; i <= len; i++ )
chatInputText.DeleteAt( caretPos );

View File

@ -173,9 +173,9 @@ namespace ClassicalSharp {
float GetBaseMultiply() {
float multiply = 0;
if( flying || noClip ) {
if( speeding ) multiply += SpeedMultiplier * 9;
if( halfSpeeding ) multiply += SpeedMultiplier * 9 / 2;
if( multiply == 0 ) multiply = SpeedMultiplier * 1.5f;
if( speeding ) multiply += SpeedMultiplier * 8;
if( halfSpeeding ) multiply += SpeedMultiplier * 8 / 2;
if( multiply == 0 ) multiply = 8f;
} else {
if( speeding ) multiply += SpeedMultiplier;
if( halfSpeeding ) multiply += SpeedMultiplier / 2;

View File

@ -59,7 +59,7 @@ namespace ClassicalSharp {
public bool NoclipSlide = true;
/// <summary> Whether the player has allowed the usage of fast double jumping abilities. </summary>
public bool DoubleJump = true;
public bool DoubleJump = false;
/// <summary> Whether the player is allowed to double jump. </summary>
public bool CanDoubleJump = true;
@ -81,6 +81,7 @@ namespace ClassicalSharp {
SpeedMultiplier = Options.GetFloat( OptionsKey.Speed, 0.1f, 50, 7 );
PushbackPlacing = Options.GetBool( OptionsKey.PushbackPlacing, false );
NoclipSlide = Options.GetBool( OptionsKey.NoclipSlide, false );
DoubleJump = Options.GetBool( OptionsKey.DoubleJump, false );
InitRenderingData();
}
@ -316,7 +317,7 @@ namespace ClassicalSharp {
flying = !flying;
} else if( key == keys[KeyBinding.NoClip] && CanNoclip && HacksEnabled ) {
noClip = !noClip;
} else if( key == keys[KeyBinding.Jump] && !onGround ) {
} else if( key == keys[KeyBinding.Jump] && !onGround && !(flying || noClip) ) {
if( firstJump && CanDoubleJump && DoubleJump ) {
DoNormalJump();
firstJump = false;