Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
The short answer is because those changes fixed other bugs.Why not simply revert the changes that created those issues?
I just added an Enhanced Interlocking Tower on the Route Layer and added the Manager and UI rules to the session rules. I'm not getting some of the paths shown in yellow although they seem to work in-game, but the 'Run time monitors' option does not appear during Driver mode.
It seems that the consist display is gone. Bug or feature?
Thanks Peter - Can confirm that the rotation problem has existed for quite some time and showed up in several previous builds SINCE your (much-welcomed) earlier updates. This is NOT an issue that mysteriously appeared just now in SP4.
void SetLamps(int position, bool facing)
{
switch(position)
{
case CAR_DERAILED:
// No point in having lights on now
SetFXCoronaTexture("eml1", null);
SetFXCoronaTexture("eml2", null);
break;
case CAR_CENTER:
// Switching off all lights - loco is in the middle of a train
SetFXCoronaTexture("eml1", null);
SetFXCoronaTexture("eml2", null);
break;
case CAR_FRONT:
if (facing)
{
// Switch on marker lights - loco is front car headed in same direction to train
SetFXCoronaTexture("eml1", null);
SetFXCoronaTexture("eml2", null);
}
else
{
// Switch on tail lights - loco is front car headed in opposite direction to train
SetFXCoronaTexture("eml1", RedMarker);
SetFXCoronaTexture("eml2", RedMarker);
}
break;
case CAR_BACK:
if (facing)
{
// Switch on tail lights - loco is end car headed in same direction to train
SetFXCoronaTexture("eml1", null);
SetFXCoronaTexture("eml2", null);
}
else
{
// Switch on marker lights - loco is end car headed in opposite direction to train
SetFXCoronaTexture("eml1", RedMarker);
SetFXCoronaTexture("eml2", RedMarker);
}
break;
case CAR_SINGLE:
if(facing)
{
SetFXCoronaTexture("eml1", null);
SetFXCoronaTexture("eml2", null);
}
else
{
SetFXCoronaTexture("eml1", null);
SetFXCoronaTexture("eml2", null);
}
break;
default:
SetFXCoronaTexture("eml1", null);
SetFXCoronaTexture("eml2", null);
break;
}
}
void SetBrakes (float brakes)
{
if (brakes == TRAIN_BRAKE_RELEASE)
{
SetFXCoronaTexture("blr1", null);
SetFXCoronaTexture("blr2", null);
SetFXCoronaTexture("blr3", null);
SetFXCoronaTexture("blr4", null);
SetFXCoronaTexture("bly1", null);
SetFXCoronaTexture("bly2", null);
SetFXCoronaTexture("bly3", null);
SetFXCoronaTexture("bly4", null);
SetFXCoronaTexture("blg1", BrakeWhite);
SetFXCoronaTexture("blg2", BrakeWhite);
SetFXCoronaTexture("blg3", BrakeWhite);
SetFXCoronaTexture("blg4", BrakeWhite);
}
else if (brakes == TRAIN_BRAKE_EMERGENCY)
{
SetFXCoronaTexture("blr1", BrakeRed);
SetFXCoronaTexture("blr2", BrakeRed);
SetFXCoronaTexture("blr3", BrakeRed);
SetFXCoronaTexture("blr4", BrakeRed);
SetFXCoronaTexture("bly1", null);
SetFXCoronaTexture("bly2", null);
SetFXCoronaTexture("bly3", null);
SetFXCoronaTexture("bly4", null);
SetFXCoronaTexture("blg1", BrakeRed);
SetFXCoronaTexture("blg2", BrakeRed);
SetFXCoronaTexture("blg3", BrakeRed);
SetFXCoronaTexture("blg4", BrakeRed);
}
else if (brakes == TRAIN_BRAKE_APPLICATION)
{
SetFXCoronaTexture("blr1", null);
SetFXCoronaTexture("blr2", null);
SetFXCoronaTexture("blr3", null);
SetFXCoronaTexture("blr4", null);
SetFXCoronaTexture("bly1", BrakeYellow);
SetFXCoronaTexture("bly2", BrakeYellow);
SetFXCoronaTexture("bly3", BrakeYellow);
SetFXCoronaTexture("bly4", BrakeYellow);
SetFXCoronaTexture("blg1", BrakeYellow);
SetFXCoronaTexture("blg2", BrakeYellow);
SetFXCoronaTexture("blg3", BrakeYellow);
SetFXCoronaTexture("blg4", BrakeYellow);
}
else
{
SetFXCoronaTexture("blr1", null);
SetFXCoronaTexture("blr2", null);
SetFXCoronaTexture("blr3", null);
SetFXCoronaTexture("blr4", null);
SetFXCoronaTexture("bly1", BrakeYellow);
SetFXCoronaTexture("bly2", BrakeYellow);
SetFXCoronaTexture("bly3", BrakeYellow);
SetFXCoronaTexture("bly4", BrakeYellow);
SetFXCoronaTexture("blg1", BrakeYellow);
SetFXCoronaTexture("blg2", BrakeYellow);
SetFXCoronaTexture("blg3", BrakeYellow);
SetFXCoronaTexture("blg4", BrakeYellow);
}
}
int PosCheck(void)
{
Vehicle[] wagons = me.GetMyTrain().GetVehicles();
int loc = CAR_CENTER;
if (me == wagons[0])
{
loc = loc + CAR_FRONT;
}
if (me == wagons[wagons.size() - 1])
{
loc = loc + CAR_BACK;
}
return loc;
}
float bstat()
{
Train hzcoa = me.GetMyTrain();
float val = hzcoa.GetTrainBrakes();
return val;
}
thread void DirectionMonitor(void)
{
bool f_dir;
int old_p_state = CAR_CENTER;
bool old_f_dir = !GetDirectionRelativeToTrain();
while (p_state > CAR_CENTER)
{
p_state = PosCheck();
f_dir = GetDirectionRelativeToTrain();
if ((old_f_dir != f_dir) or (old_p_state != p_state))
{
old_f_dir = f_dir;
old_p_state = p_state;
SetLamps(p_state, f_dir);
}
Sleep(3.0);
}
f_dir = GetDirectionRelativeToTrain();
if ((old_f_dir != f_dir) or (old_p_state != p_state))
{
SetLamps(p_state, f_dir);
}
runDM = 1;
}
thread void VehicleMonitor(void)
{
Message msg;
while (p_state != CAR_DERAILED)
{
p_state = PosCheck();
if (p_state and runDM)
{
runDM = 0;
DirectionMonitor();
}
wait()
{
on "Vehicle", "Coupled":
{
}
on "Vehicle", "Decoupled":
{
}
on "Vehicle", "Derailed", msg:
{
if (msg.src == me)
{
p_state = CAR_DERAILED;
b_state = 6.0;
SetFXCoronaTexture("blr1", null);
SetFXCoronaTexture("blr2", null);
SetFXCoronaTexture("blr3", null);
SetFXCoronaTexture("blr4", null);
SetFXCoronaTexture("bly1", null);
SetFXCoronaTexture("bly2", null);
SetFXCoronaTexture("bly3", null);
SetFXCoronaTexture("bly4", null);
SetFXCoronaTexture("blg1", null);
SetFXCoronaTexture("blg2", null);
SetFXCoronaTexture("blg3", null);
SetFXCoronaTexture("blg4", null);
}
}
on "Train", "StartedMoving":
{
}
on "World", "ModuleInit":
{
p_state = PosCheck();
SetLamps(p_state, GetDirectionRelativeToTrain());
}
}
p_state = PosCheck();
}
}
thread void BrakeMonitor()
{
while (b_state != 6.0)
{
b_state = bstat();
SetBrakes(b_state);
Sleep(3.0);
}
}