@@ -523,14 +523,14 @@ public void Reset()
523
523
Initialize ( ) ;
524
524
}
525
525
526
- public int CreateStaticObject ( StaticObject Prototype , Vector3 Position , Transformation WorldTransformation , Transformation LocalTransformation , ObjectDisposalMode AccurateObjectDisposal , double AccurateObjectDisposalZOffset , double StartingDistance , double EndingDistance , double BlockLength , double TrackPosition , double Brightness )
526
+ public int CreateStaticObject ( StaticObject Prototype , Vector3 Position , Transformation WorldTransformation , Transformation LocalTransformation , ObjectDisposalMode AccurateObjectDisposal , double AccurateObjectDisposalZOffset , WorldProperties Properties , double BlockLength )
527
527
{
528
528
Matrix4D Translate = Matrix4D . CreateTranslation ( Position . X , Position . Y , - Position . Z ) ;
529
529
Matrix4D Rotate = ( Matrix4D ) new Transformation ( LocalTransformation , WorldTransformation ) ;
530
- return CreateStaticObject ( Position , Prototype , LocalTransformation , Rotate , Translate , AccurateObjectDisposal , AccurateObjectDisposalZOffset , StartingDistance , EndingDistance , BlockLength , TrackPosition , Brightness ) ;
530
+ return CreateStaticObject ( Position , Prototype , LocalTransformation , Rotate , Translate , AccurateObjectDisposal , AccurateObjectDisposalZOffset , Properties , BlockLength ) ;
531
531
}
532
532
533
- public int CreateStaticObject ( Vector3 Position , StaticObject Prototype , Transformation LocalTransformation , Matrix4D Rotate , Matrix4D Translate , ObjectDisposalMode AccurateObjectDisposal , double AccurateObjectDisposalZOffset , double StartingDistance , double EndingDistance , double BlockLength , double TrackPosition , double Brightness )
533
+ public int CreateStaticObject ( Vector3 Position , StaticObject Prototype , Transformation LocalTransformation , Matrix4D Rotate , Matrix4D Translate , ObjectDisposalMode AccurateObjectDisposal , double AccurateObjectDisposalZOffset , WorldProperties Properties , double BlockLength )
534
534
{
535
535
if ( Prototype == null )
536
536
{
@@ -578,21 +578,21 @@ public int CreateStaticObject(Vector3 Position, StaticObject Prototype, Transfor
578
578
switch ( AccurateObjectDisposal )
579
579
{
580
580
case ObjectDisposalMode . Accurate :
581
- startingDistance += ( float ) TrackPosition ;
582
- endingDistance += ( float ) TrackPosition ;
583
- double z = BlockLength * Math . Floor ( TrackPosition / BlockLength ) ;
584
- StartingDistance = Math . Min ( z - BlockLength , startingDistance ) ;
585
- EndingDistance = Math . Max ( z + 2.0 * BlockLength , endingDistance ) ;
586
- startingDistance = ( float ) ( BlockLength * Math . Floor ( StartingDistance / BlockLength ) ) ;
587
- endingDistance = ( float ) ( BlockLength * Math . Ceiling ( EndingDistance / BlockLength ) ) ;
581
+ startingDistance += ( float ) Properties . TrackPosition ;
582
+ endingDistance += ( float ) Properties . TrackPosition ;
583
+ double z = BlockLength * Math . Floor ( Properties . TrackPosition / BlockLength ) ;
584
+ Properties . StartingDistance = Math . Min ( z - BlockLength , startingDistance ) ;
585
+ Properties . EndingDistance = Math . Max ( z + 2.0 * BlockLength , endingDistance ) ;
586
+ startingDistance = ( float ) ( BlockLength * Math . Floor ( Properties . StartingDistance / BlockLength ) ) ;
587
+ endingDistance = ( float ) ( BlockLength * Math . Ceiling ( Properties . EndingDistance / BlockLength ) ) ;
588
588
break ;
589
589
case ObjectDisposalMode . Legacy :
590
- startingDistance = ( float ) StartingDistance ;
591
- endingDistance = ( float ) EndingDistance ;
590
+ startingDistance = ( float ) Properties . StartingDistance ;
591
+ endingDistance = ( float ) Properties . EndingDistance ;
592
592
break ;
593
593
case ObjectDisposalMode . Mechanik :
594
- startingDistance = ( float ) StartingDistance ;
595
- endingDistance = ( float ) EndingDistance + 1500 ;
594
+ startingDistance = ( float ) Properties . StartingDistance ;
595
+ endingDistance = ( float ) Properties . EndingDistance + 1500 ;
596
596
if ( startingDistance < 0 )
597
597
{
598
598
startingDistance = 0 ;
@@ -604,7 +604,7 @@ public int CreateStaticObject(Vector3 Position, StaticObject Prototype, Transfor
604
604
Prototype = Prototype ,
605
605
Translation = Translate ,
606
606
Rotate = Rotate ,
607
- Brightness = Brightness ,
607
+ Brightness = Properties . Brightness ,
608
608
StartingDistance = startingDistance ,
609
609
EndingDistance = endingDistance ,
610
610
WorldPosition = Position
0 commit comments