mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Make rain/snow fade out properly and make them much higher (looks nicer), fix update checking to the point it can now download to update.zip.
This commit is contained in:
parent
d1818f6e23
commit
6f60ae2c02
@ -41,7 +41,7 @@ namespace ClassicalSharp {
|
||||
for( int dx = -extent; dx <= extent; dx++ ) {
|
||||
for( int dz = -extent; dz <= extent; dz++ ) {
|
||||
int rainY = Math.Max( pos.Y, GetRainHeight( pos.X + dx, pos.Z + dz ) + 1 );
|
||||
int height = Math.Min( 6 - ( rainY - pos.Y ), 6 );
|
||||
int height = Math.Min( 20 - (rainY - pos.Y), 20 );
|
||||
if( height <= 0 ) continue;
|
||||
|
||||
col.A = (byte)Math.Max( 0, AlphaAt( dx * dx + dz * dz ) );
|
||||
@ -61,7 +61,7 @@ namespace ClassicalSharp {
|
||||
|
||||
float AlphaAt( float x ) {
|
||||
// Wolfram Alpha: fit {0,178},{1,169},{4,147},{9,114},{16,59},{25,9}
|
||||
return 0.05f * x * x - 8 * x + 178;
|
||||
return 0.05f * x * x - 7 * x + 178;
|
||||
}
|
||||
|
||||
void MakeRainForSquare( int x, int y, int height, int z, FastColour col, ref int index ) {
|
||||
|
@ -35,19 +35,19 @@ namespace Launcher2 {
|
||||
void CheckUpdates() {
|
||||
var response = GetHtml( UpdatesUri, UpdatesUri );
|
||||
foreach( string line in response ) {
|
||||
Console.WriteLine( line );
|
||||
if( line.StartsWith( "latest.", ordinal ) ) {
|
||||
if( line.StartsWith( @"<a href=""latest.", ordinal ) ) {
|
||||
int index = 0;
|
||||
string buildName = ReadToken( line, ref index );
|
||||
string date = ReadToken( line, ref index );
|
||||
string time = ReadToken( line, ref index );
|
||||
string buildSize = ReadToken( line, ref index );
|
||||
string text = line.Substring( @"<a href=""".Length );
|
||||
|
||||
string buildName = ReadToken( text, ref index );
|
||||
string date = ReadToken( text, ref index );
|
||||
string time = ReadToken( text, ref index );
|
||||
string buildSize = ReadToken( text, ref index );
|
||||
|
||||
if( line.StartsWith( "latest.zip", ordinal ) ) {
|
||||
if( buildName.Contains( "latest.zip" ) ) {
|
||||
LatestDevDate = date + " " + time;
|
||||
LatestDevSize = buildSize;
|
||||
} else if( line.StartsWith( "latest.Release.zip", ordinal ) ) {
|
||||
} else if( buildName.Contains( "latest.Release.zip" ) ) {
|
||||
LatestStableDate = date + " " + time;
|
||||
LatestStableSize = buildSize;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user