Reset all time members of vehicle:
- Reset (nullify) all times when a new route is set. Fixes a bug where there is a trip time when in second day and still has not arrived.
This commit is contained in:
		
							parent
							
								
									024babaf3f
								
							
						
					
					
						commit
						8bb64bea64
					
				@ -115,6 +115,9 @@ public abstract class Vehicle {
 | 
			
		||||
        this.route = route;
 | 
			
		||||
        this.arrivedToDest = false;
 | 
			
		||||
        this.routeTimeHistory.clear();
 | 
			
		||||
        this.timeStartedOnCurrentStreet = null;
 | 
			
		||||
        this.timeStartedMoving = null;
 | 
			
		||||
        this.timeOfArrival = null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void setVehicleSize(double vehicleSize) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user