@@ -909,7 +909,7 @@ private void positionSeats(){
909909 getWorld ().spawnEntityInWorld (seats .get (i1 ));
910910 }
911911 cachedVectors [0 ] = new Vec3f (getRiderOffsets ()[i1 ][0 ], getRiderOffsets ()[i1 ][1 ], getRiderOffsets ()[i1 ][2 ])
912- .rotatePoint (rotationPitch , rotationYaw , 0f );
912+ .rotatePoint (rotationPitch , 180 + rotationYaw , 0f );
913913 cachedVectors [0 ].addVector (posX ,posY ,posZ );
914914 seats .get (i1 ).setPosition (cachedVectors [0 ].xCoord , cachedVectors [0 ].yCoord , cachedVectors [0 ].zCoord );
915915 }
@@ -1007,7 +1007,7 @@ public void addLinkingMove(double velocity){
10071007 bogieFront .addLinking (this , velocity );
10081008 }
10091009 public void manageLink (AbstractTrains other ) {
1010- if (isAccelerating () || other .bogieBack ==null || other .bogieFront ==null || bogieBack ==null || bogieFront ==null ) {
1010+ if (isLocoTurnedOn || other .bogieBack ==null || other .bogieFront ==null || bogieBack ==null || bogieFront ==null ) {
10111011 return ;
10121012 }
10131013
@@ -1062,6 +1062,10 @@ public void finalMove(){
10621062 bogieBack .posX - bogieFront .posX )),
10631063 CommonUtil .calculatePitch (bogieFront .posY , bogieBack .posY , Math .abs (rotationPoints ()[0 ]) + Math .abs (rotationPoints ()[1 ])));
10641064
1065+ cachedVectors [1 ]= new Vec3f (rotationPoints ()[0 ], 0 , 0 ).rotatePoint (0 , rotationYaw , 0 )
1066+ .addVector (posX ,0 ,posZ );
1067+ bogieFront .setPosition (cachedVectors [1 ].xCoord , bogieFront .posY ,cachedVectors [1 ].zCoord );
1068+
10651069 //reset the vector when we're done so it wont break trains.
10661070 cachedVectors [1 ]= new Vec3f (0 ,0 ,0 );
10671071 //update the collision handler's positions
@@ -1075,22 +1079,20 @@ public void finalMove(){
10751079
10761080 @ Override
10771081 public void applyDrag () {
1078- boolean canSlope =ConfigHandler .ENABLE_SLOPE_ACCELERATION ;
10791082 float drag = 0.9998f , brakeBuff = 0 ;
10801083 //check if lope things can be done at all
10811084 for (AbstractTrains stock : consist ) {
1082- if (stock !=this && stock .isAccelerating ()){
1083- canSlope =false ;
1084- break ;
1085- } else if (stock ==this ){
1086- break ;
1085+ if (stock !=this && stock .isLocoTurnedOn ){
1086+ return ;
1087+ } else if (stock ==this && isAccelerating ()){
1088+ return ;
10871089 }
10881090 }
10891091 if (isBraking ) {
10901092 //realistically would be more like 2.4, but 5 makes gameplay more dramatic
10911093 brakeBuff += weightKg () * 3.0f ;
10921094 }
1093- if (canSlope ) {
1095+ if (ConfigHandler . ENABLE_SLOPE_ACCELERATION ) {
10941096 if (Math .abs (rotationPitch ) - 1 > 0 ) { //cap the pitch that we actually consider to be on a slope
10951097 //vanilla uses 0.0078125 per tick for slope speed.
10961098 //0.00017361 would be that divided by 45 since vanilla slopes are 45 degree angles.
0 commit comments