mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -04:00
Can use air block models, also make noclip sliding configurable.
This commit is contained in:
parent
35e0f8cab5
commit
9707b083db
@ -43,6 +43,11 @@ namespace ClassicalSharp {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
Make( 140, 0, "Noclip slide", OnWidgetClick,
|
||||||
|
g => g.LocalPlayer.NoclipSlide ? "yes" : "no",
|
||||||
|
(g, v) => { g.LocalPlayer.NoclipSlide = v == "yes";
|
||||||
|
Options.Set( OptionsKey.NoclipSlide, v == "yes" ); } ),
|
||||||
|
|
||||||
MakeBack( false, titleFont,
|
MakeBack( false, titleFont,
|
||||||
(g, w) => g.SetNewScreen( new PauseScreen( g ) ) ),
|
(g, w) => g.SetNewScreen( new PauseScreen( g ) ) ),
|
||||||
null,
|
null,
|
||||||
@ -54,6 +59,7 @@ namespace ClassicalSharp {
|
|||||||
|
|
||||||
new BooleanValidator(),
|
new BooleanValidator(),
|
||||||
new BooleanValidator(),
|
new BooleanValidator(),
|
||||||
|
new BooleanValidator(),
|
||||||
};
|
};
|
||||||
okayIndex = buttons.Length - 1;
|
okayIndex = buttons.Length - 1;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace ClassicalSharp {
|
|||||||
bool useLiquidGravity = false; // used by BlockDefinitions.
|
bool useLiquidGravity = false; // used by BlockDefinitions.
|
||||||
bool canLiquidJump = true;
|
bool canLiquidJump = true;
|
||||||
void UpdateVelocityState( float xMoving, float zMoving ) {
|
void UpdateVelocityState( float xMoving, float zMoving ) {
|
||||||
if( noClip && xMoving == 0 && zMoving == 0 )
|
if( !NoclipSlide && (noClip && xMoving == 0 && zMoving == 0) )
|
||||||
Velocity = Vector3.Zero;
|
Velocity = Vector3.Zero;
|
||||||
|
|
||||||
if( flying || noClip ) {
|
if( flying || noClip ) {
|
||||||
|
@ -53,6 +53,9 @@ namespace ClassicalSharp {
|
|||||||
/// <summary> Whether the player is allowed to see all entity name tags. </summary>
|
/// <summary> Whether the player is allowed to see all entity name tags. </summary>
|
||||||
public bool CanSeeAllNames = true;
|
public bool CanSeeAllNames = true;
|
||||||
|
|
||||||
|
/// <summary> Whether the player should slide after letting go of movement buttons in noclip. </summary>
|
||||||
|
public bool NoclipSlide = true;
|
||||||
|
|
||||||
float jumpVel = 0.42f;
|
float jumpVel = 0.42f;
|
||||||
/// <summary> Returns the height that the client can currently jump up to.<br/>
|
/// <summary> Returns the height that the client can currently jump up to.<br/>
|
||||||
/// Note that when speeding is enabled the client is able to jump much further. </summary>
|
/// Note that when speeding is enabled the client is able to jump much further. </summary>
|
||||||
@ -69,6 +72,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, true );
|
||||||
InitRenderingData();
|
InitRenderingData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ namespace ClassicalSharp {
|
|||||||
ViewBobbing = Options.GetBool( OptionsKey.ViewBobbing, false );
|
ViewBobbing = Options.GetBool( OptionsKey.ViewBobbing, false );
|
||||||
ShowBlockInHand = Options.GetBool( OptionsKey.ShowBlockInHand, true );
|
ShowBlockInHand = Options.GetBool( OptionsKey.ShowBlockInHand, true );
|
||||||
InvertMouse = Options.GetBool( OptionsKey.InvertMouse, false );
|
InvertMouse = Options.GetBool( OptionsKey.InvertMouse, false );
|
||||||
|
SimpleArmsAnim = Options.GetBool( OptionsKey.SimpleArmsAnim, false );
|
||||||
|
|
||||||
TerrainAtlas1D = new TerrainAtlas1D( Graphics );
|
TerrainAtlas1D = new TerrainAtlas1D( Graphics );
|
||||||
TerrainAtlas = new TerrainAtlas2D( Graphics, Drawer2D );
|
TerrainAtlas = new TerrainAtlas2D( Graphics, Drawer2D );
|
||||||
|
@ -31,8 +31,6 @@ namespace ClassicalSharp.Model {
|
|||||||
byte blockId;
|
byte blockId;
|
||||||
if( Byte.TryParse( modelName, out blockId ) ) {
|
if( Byte.TryParse( modelName, out blockId ) ) {
|
||||||
modelName = "block";
|
modelName = "block";
|
||||||
if( blockId == 0 )
|
|
||||||
return cache["humanoid"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !cache.TryGetValue( modelName, out model ) ) {
|
if( !cache.TryGetValue( modelName, out model ) ) {
|
||||||
|
@ -34,6 +34,7 @@ namespace ClassicalSharp {
|
|||||||
public const string LiquidsBreakable = "liquidsbreakable";
|
public const string LiquidsBreakable = "liquidsbreakable";
|
||||||
public const string PushbackPlacing = "pushbackplacing";
|
public const string PushbackPlacing = "pushbackplacing";
|
||||||
public const string InvertMouse = "invertmouse";
|
public const string InvertMouse = "invertmouse";
|
||||||
|
public const string NoclipSlide = "noclipslide";
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: implement this
|
// TODO: implement this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user