Core/Transports: fixed a typo that was causing transports to move faster than intended after making them return to stop frame 0 via GO_STATE_TRANSPORT_ACTIVE

This commit is contained in:
Ovahlord
2019-10-30 03:36:25 +01:00
parent e30d474aa6
commit 385d2b2b27

View File

@@ -480,6 +480,7 @@ void Transport::SetTransportState(GOState state, uint32 stopFrame /*= 0*/)
stopTimer = currentStopFrameTime / 2;
SetPeriod(getMSTime() + stopTimer);
SetExpectedTravelTime(stopTimer);
SetDestinationStopFrameTime(m_goValue.Transport.StopFrames->at(0));
}
}
else
@@ -499,11 +500,11 @@ void Transport::SetTransportState(GOState state, uint32 stopFrame /*= 0*/)
// Transport destinations are sent as msTime + travel time from frame A to B
SetPeriod(getMSTime() + travelTime);
SetExpectedTravelTime(travelTime);
SetDestinationStopFrameTime(stopTimer);
state = GOState(GO_STATE_TRANSPORT_STOPPED + stopFrame);
}
m_goValue.Transport.PathProgress = getMSTime() + stopTimer;
SetDestinationStopFrameTime(stopTimer);
SetLastStopFrameTime(currentStopFrameTime);
SetGoState(state);
}