mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-28 07:55:38 -04:00
Remove a redundant foreach.
This commit is contained in:
parent
bd1f2c9597
commit
25b8f453ad
@ -166,9 +166,6 @@ namespace ClassicalSharp.Entities {
|
||||
}
|
||||
|
||||
void MoveNormal( float xMoving, float zMoving, float factor, Vector3 drag, float gravity, float yMul ) {
|
||||
if(entity.BlockUnderFeet == 8 || entity.BlockUnderFeet == 9 || entity.BlockUnderFeet == 10 || entity.BlockUnderFeet == 11) {
|
||||
entity.Velocity.Y += 2; entity.Velocity.Y = 0;
|
||||
}
|
||||
AdjHeadingVelocity( zMoving, xMoving, factor );
|
||||
Move( xMoving, zMoving, factor, drag, gravity, yMul );
|
||||
}
|
||||
|
@ -163,13 +163,13 @@ namespace ClassicalSharp {
|
||||
static void LoadFrom( StreamReader reader ) {
|
||||
string line;
|
||||
// remove all the unchanged options
|
||||
List<string> toRemoveKeys = new List<string>();
|
||||
List<string> toRemove = new List<string>();
|
||||
foreach( KeyValuePair<string, string> kvp in OptionsSet ) {
|
||||
if( !OptionsChanged.ContainsKey( kvp.Key ) )
|
||||
toRemoveKeys.Add( kvp.Key );
|
||||
toRemove.Add( kvp.Key );
|
||||
}
|
||||
foreach( string key in toRemoveKeys )
|
||||
OptionsSet.Remove( key );
|
||||
for( int i = 0; i < toRemove.Count; i++ )
|
||||
OptionsSet.Remove( toRemove[i] );
|
||||
|
||||
while( (line = reader.ReadLine()) != null ) {
|
||||
if( line.Length == 0 || line[0] == '#' ) continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user