mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -04:00
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:
parent
cfa93e0eef
commit
f4ce55cb5c
@ -276,7 +276,7 @@ namespace ClassicalSharp {
|
|||||||
suppressNextPress = false;
|
suppressNextPress = false;
|
||||||
|
|
||||||
if( HandlesAllInput ) { // text input bar
|
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 ) ) {
|
|| key == game.Mapping( KeyBinding.PauseOrExit ) ) {
|
||||||
HandlesAllInput = false;
|
HandlesAllInput = false;
|
||||||
if( game.CursorVisible )
|
if( game.CursorVisible )
|
||||||
|
@ -105,6 +105,7 @@ namespace ClassicalSharp {
|
|||||||
caretPos -= len;
|
caretPos -= len;
|
||||||
|
|
||||||
if( caretPos < 0 ) caretPos = 0;
|
if( caretPos < 0 ) caretPos = 0;
|
||||||
|
if( caretPos != 0 ) caretPos++; // Don't remove space.
|
||||||
for( int i = 0; i <= len; i++ )
|
for( int i = 0; i <= len; i++ )
|
||||||
chatInputText.DeleteAt( caretPos );
|
chatInputText.DeleteAt( caretPos );
|
||||||
|
|
||||||
|
@ -173,9 +173,9 @@ namespace ClassicalSharp {
|
|||||||
float GetBaseMultiply() {
|
float GetBaseMultiply() {
|
||||||
float multiply = 0;
|
float multiply = 0;
|
||||||
if( flying || noClip ) {
|
if( flying || noClip ) {
|
||||||
if( speeding ) multiply += SpeedMultiplier * 9;
|
if( speeding ) multiply += SpeedMultiplier * 8;
|
||||||
if( halfSpeeding ) multiply += SpeedMultiplier * 9 / 2;
|
if( halfSpeeding ) multiply += SpeedMultiplier * 8 / 2;
|
||||||
if( multiply == 0 ) multiply = SpeedMultiplier * 1.5f;
|
if( multiply == 0 ) multiply = 8f;
|
||||||
} else {
|
} else {
|
||||||
if( speeding ) multiply += SpeedMultiplier;
|
if( speeding ) multiply += SpeedMultiplier;
|
||||||
if( halfSpeeding ) multiply += SpeedMultiplier / 2;
|
if( halfSpeeding ) multiply += SpeedMultiplier / 2;
|
||||||
|
@ -59,7 +59,7 @@ namespace ClassicalSharp {
|
|||||||
public bool NoclipSlide = true;
|
public bool NoclipSlide = true;
|
||||||
|
|
||||||
/// <summary> Whether the player has allowed the usage of fast double jumping abilities. </summary>
|
/// <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>
|
/// <summary> Whether the player is allowed to double jump. </summary>
|
||||||
public bool CanDoubleJump = true;
|
public bool CanDoubleJump = true;
|
||||||
@ -81,6 +81,7 @@ namespace ClassicalSharp {
|
|||||||
SpeedMultiplier = Options.GetFloat( OptionsKey.Speed, 0.1f, 50, 7 );
|
SpeedMultiplier = Options.GetFloat( OptionsKey.Speed, 0.1f, 50, 7 );
|
||||||
PushbackPlacing = Options.GetBool( OptionsKey.PushbackPlacing, false );
|
PushbackPlacing = Options.GetBool( OptionsKey.PushbackPlacing, false );
|
||||||
NoclipSlide = Options.GetBool( OptionsKey.NoclipSlide, false );
|
NoclipSlide = Options.GetBool( OptionsKey.NoclipSlide, false );
|
||||||
|
DoubleJump = Options.GetBool( OptionsKey.DoubleJump, false );
|
||||||
InitRenderingData();
|
InitRenderingData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,7 +317,7 @@ namespace ClassicalSharp {
|
|||||||
flying = !flying;
|
flying = !flying;
|
||||||
} else if( key == keys[KeyBinding.NoClip] && CanNoclip && HacksEnabled ) {
|
} else if( key == keys[KeyBinding.NoClip] && CanNoclip && HacksEnabled ) {
|
||||||
noClip = !noClip;
|
noClip = !noClip;
|
||||||
} else if( key == keys[KeyBinding.Jump] && !onGround ) {
|
} else if( key == keys[KeyBinding.Jump] && !onGround && !(flying || noClip) ) {
|
||||||
if( firstJump && CanDoubleJump && DoubleJump ) {
|
if( firstJump && CanDoubleJump && DoubleJump ) {
|
||||||
DoNormalJump();
|
DoNormalJump();
|
||||||
firstJump = false;
|
firstJump = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user