From ebb629ca1935f98c9bd179145dc97d3ccaf2699c Mon Sep 17 00:00:00 2001 From: kmetykog Date: Fri, 14 Oct 2011 21:28:42 +0000 Subject: [PATCH] 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 --- src/modules/graphic/ssggraph/grtrackmap.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/graphic/ssggraph/grtrackmap.cpp b/src/modules/graphic/ssggraph/grtrackmap.cpp index f79bc0cda..aca199851 100644 --- a/src/modules/graphic/ssggraph/grtrackmap.cpp +++ b/src/modules/graphic/ssggraph/grtrackmap.cpp @@ -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);