Bugfix: in OMC when driving backwards at start, and then drive towards the
small gap between the book and the wall (to the right), an invalid driveline index would be accessed. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2834 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
1f38f1afb2
commit
161605ceb0
@ -510,6 +510,8 @@ void LinearWorld::rescueKartAfterShortcut(Kart* kart, KartInfo& kart_info)
|
|||||||
|
|
||||||
// add one because 'moveKartAfterRescue' removes 1
|
// add one because 'moveKartAfterRescue' removes 1
|
||||||
kart_info.m_track_sector = kart_info.m_last_valid_sector+1;
|
kart_info.m_track_sector = kart_info.m_last_valid_sector+1;
|
||||||
|
if(kart_info.m_track_sector>=(int)m_track->m_driveline.size())
|
||||||
|
kart_info.m_track_sector = 0;
|
||||||
kart_info.m_race_lap = kart_info.m_last_valid_race_lap;
|
kart_info.m_race_lap = kart_info.m_last_valid_race_lap;
|
||||||
|
|
||||||
kart->doingShortcut();
|
kart->doingShortcut();
|
||||||
|
Loading…
Reference in New Issue
Block a user