diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js index 3363b0be9..d5116bccd 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js @@ -320,13 +320,16 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri } function otherTrainRun(data){ - - if(data.length != trainlisttest.otherTrainmodels.length && trainlisttest.updatStatus == false){ + if(data.length > trainlisttest.otherTrainmodels.length && trainlisttest.updatStatus == false){ trainlisttest.addDriveTrain(data); + }else if(data.length < trainlisttest.otherTrainmodels.length){ + + let removelength = trainlisttest.otherTrainmodels.length - data.length; + trainlisttest.removeDriveTrain(removelength); }else{ for(let i=0,leni=data.length;i