Fixes #471: Onscreen map skips opponent modes when no opp is present.

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3973 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 080e3e79db2909846dcc8d03633748be5c227a90
Former-commit-id: 1808f2cc694b5d4ebc877ddcb1d5e07f66d6fa9a
This commit is contained in:
kmetykog 2011-10-14 21:28:42 +00:00
parent 128c784dbc
commit ebb629ca19

View file

@ -478,6 +478,18 @@ void cGrTrackMap::display(
return;
}
// Ticket #471
// Each map style has 2 modes - single and plus opponents.
// It should skip the 'opponents mode' if there are none
// (ie. in practice, or qualification).
if (situation->_ncars == 1 // the car is alone
&& (viewmode & (TRACK_MAP_NORMAL_WITH_OPPONENTS
| TRACK_MAP_PAN_WITH_OPPONENTS
| TRACK_MAP_PAN_ALIGNED_WITH_OPPONENTS))) {
selectTrackMap(); //skip onto next map mode
} //if _ncars
// end Ticket #471
// Compute track map position.
int x = Winx + Winw + map_x - (int) (map_size*track_x_ratio);
int y = Winy + Winh + map_y - (int) (map_size*track_y_ratio);