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