Skip to content

Commit

Permalink
Fix brake pressure propogation
Browse files Browse the repository at this point in the history
  • Loading branch information
cam72cam committed Oct 6, 2023
1 parent 90bbdec commit c4ae6ee
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,13 @@ public static void iterate(Map<UUID, SimulationState> states, Map<UUID, Simulati

// Propogate brake pressure


for (Particle particle : consist) {
if (particle.nextLink != null) {
particle.nextLink.setup();
}
}

List<SimulationState> linked = new ArrayList<>();
for (Particle source : consist) {
linked.add(source.state);
Expand Down Expand Up @@ -551,12 +558,6 @@ public static void iterate(Map<UUID, SimulationState> states, Map<UUID, Simulati
double stepsPerTick = 40;
double dt_S = (1 / (ticksPerSecond * stepsPerTick));

for (Particle particle : particles) {
if (particle.nextLink != null) {
particle.nextLink.setup();
}
}



// Spread forces
Expand Down

0 comments on commit c4ae6ee

Please sign in to comment.