diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:34 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-09-20 19:19:34 +0200 | 
| commit | e7d20cf352688bf717a01f4e6d9e6f497c2bea4c (patch) | |
| tree | cfd2ef9b569f49af985a6f1ec44f2614f63c8e78 /app/bin/tcurve.c | |
| parent | a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 (diff) | |
New upstream version 5.3.1Beta2upstream/5.3.1Beta2
Diffstat (limited to 'app/bin/tcurve.c')
| -rw-r--r-- | app/bin/tcurve.c | 30 | 
1 files changed, 17 insertions, 13 deletions
diff --git a/app/bin/tcurve.c b/app/bin/tcurve.c index 65b6bcc..5c56dd3 100644 --- a/app/bin/tcurve.c +++ b/app/bin/tcurve.c @@ -441,12 +441,14 @@ static void UpdateCurve( track_p trk, int inx, descData_p descUpd,  			crvData.radius = xx0.radius;  			crvDesc[RA].mode |= DESC_CHANGE;  		} else { -			if ( crvData.pivot == DESC_PIVOT_FIRST || GetTrkEndTrk(trk,0) ) { -				Translate( &xx0.pos, xx0.pos, a0, xx0.radius-crvData.radius ); -			} else if ( crvData.pivot == DESC_PIVOT_SECOND || GetTrkEndTrk(trk,1) ) { -				Translate( &xx0.pos, xx0.pos, a0+a1, xx0.radius-crvData.radius ); -			} else { -				Translate( &xx0.pos, xx0.pos, a0+a1/2.0, xx0.radius-crvData.radius ); +			if ( xx0.helixTurns==0 && xx0.circle==FALSE ) { +				if ( crvData.pivot == DESC_PIVOT_FIRST || GetTrkEndTrk(trk,0) ) { +					Translate( &xx0.pos, xx0.pos, a0, xx0.radius-crvData.radius ); +				} else if ( crvData.pivot == DESC_PIVOT_SECOND || GetTrkEndTrk(trk,1) ) { +					Translate( &xx0.pos, xx0.pos, a0+a1, xx0.radius-crvData.radius ); +				} else { +					Translate( &xx0.pos, xx0.pos, a0+a1/2.0, xx0.radius-crvData.radius ); +				}  			}  			crvDesc[CE].mode |= DESC_CHANGE;  			xx0.radius = crvData.radius; @@ -748,9 +750,6 @@ static void DrawCurvedTies(  		return;  	} -	if (color == wDrawColorBlack) { -		color = tieColor; -	}  	len = 2*M_PI*r*a1/360.0;  	cnt = (int)floor(len/td.spacing + 0.5);  	if ( len - td.spacing*cnt - (td.width/2) > (td.spacing - td.width)/2 ) { @@ -829,9 +828,15 @@ EXPORT void DrawCurvedTrack(  	if (color == wDrawColorBlack) {  		color = normalColor;  	} +	int iDrawCenter = centerDrawMode; +	if ( options & DTS_NOCENTER ) { +		iDrawCenter = FALSE; +	} +	if ( d == &mapD ) { +		iDrawCenter = FALSE; +	}  	if ( ! DrawTwoRails( d, 1 ) ) { -		DrawArc( d, p, r, a0, a1, (centerDrawMode -		                           && !(options&DTS_NOCENTER)) ? 1 : 0, width, color ); +		DrawArc( d, p, r, a0, a1, iDrawCenter, width, color );  	} else {  		if ( hasTrackCenterline(d)) {  			long options = d->options; @@ -840,8 +845,7 @@ EXPORT void DrawCurvedTrack(  			d->options = options;  		}  		DrawArc( d, p, r+trackGauge/2.0, a0, a1, 0, width, color ); -		DrawArc( d, p, r-trackGauge/2.0, a0, a1, (centerDrawMode -		                && !(options&DTS_NOCENTER) ? 1: 0), width, color ); +		DrawArc( d, p, r-trackGauge/2.0, a0, a1, iDrawCenter, width, color );  		if ( (d->options&DC_PRINT) && roadbedWidth > trackGauge  		     && DrawTwoRails( d, 1 ) ) {  			wDrawWidth rbw = (wDrawWidth)floor(roadbedLineWidth*(d->dpi/d->scale)+0.5);  | 
