| 1271 | } |
| 1272 | |
| 1273 | void CStaticMapMain::DrawExt(float alpha) |
| 1274 | { |
| 1275 | CStaticMap::DrawExt(alpha); |
| 1276 | |
| 1277 | #if _ENABLE_CHEATS |
| 1278 | if (!_show) |
| 1279 | return; |
| 1280 | |
| 1281 | if (_showUnits || _showTargets) |
| 1282 | DrawExposure(); |
| 1283 | if (CHECK_DIAG(DECostMap)) |
| 1284 | DrawCost(); |
| 1285 | #endif |
| 1286 | |
| 1287 | AIUnit* me = GetMyUnit(); |
| 1288 | AIGroup* myGroup = me ? me->GetGroup() : nullptr; |
| 1289 | AICenter* myCenter = GetMyCenter(); |
| 1290 | if (!myCenter) |
| 1291 | { |
| 1292 | return; |
| 1293 | } |
| 1294 | |
| 1295 | DrawCommands(); |
| 1296 | DrawMarkers(); |
| 1297 | #if _ENABLE_CHEATS |
| 1298 | if (_showSensors) |
| 1299 | DrawSensors(); |
| 1300 | #endif |
| 1301 | if (myGroup) |
| 1302 | { |
| 1303 | DrawWaypoints(myCenter, myGroup); |
| 1304 | } |
| 1305 | |
| 1306 | // Dev-panel show-all-units cheat — independent of the legacy |
| 1307 | // _showUnits (which is _ENABLE_CHEATS-only). Draws every AICenter |
| 1308 | // unconditionally so the player sees ALL sides regardless of |
| 1309 | // fog-of-war / side filtering. |
| 1310 | if (DebugCheats::Cmd_ShowAllUnits::IsActive()) |
| 1311 | { |
| 1312 | DrawUnits(GWorld->GetWestCenter()); |
| 1313 | DrawUnits(GWorld->GetEastCenter()); |
| 1314 | DrawUnits(GWorld->GetGuerrilaCenter()); |
| 1315 | DrawUnits(GWorld->GetCivilianCenter()); |
| 1316 | DrawUnits(GWorld->GetLogicCenter()); |
| 1317 | } |
| 1318 | #if _ENABLE_CHEATS |
| 1319 | if (_showUnits) |
| 1320 | { |
| 1321 | DrawUnits(GWorld->GetWestCenter()); |
| 1322 | DrawUnits(GWorld->GetEastCenter()); |
| 1323 | DrawUnits(GWorld->GetGuerrilaCenter()); |
| 1324 | DrawUnits(GWorld->GetCivilianCenter()); |
| 1325 | DrawUnits(GWorld->GetLogicCenter()); |
| 1326 | } |
| 1327 | else if (_showTargets) |
| 1328 | { |
| 1329 | // draw targets |
| 1330 | int n = myCenter->NTargets(); |
nothing calls this directly
no test coverage detected