- change MP map logic a bit

This commit is contained in:
Ilya Shurumov 2021-06-06 12:10:57 +06:00 committed by InspirationByte
parent c51dca90c9
commit fe29da78e9
2 changed files with 17 additions and 17 deletions

View File

@ -135,7 +135,7 @@ void SetFullscreenDrawing(void)
SetDrawEnv(drenv, &drawenv);
addPrim(current->ot + 4, drenv);
addPrim(current->ot + 2, drenv);
current->primptr += sizeof(DR_ENV);
}

View File

@ -888,6 +888,11 @@ void InitOverheadMap(void)
int c;
int tpage;
if (NumPlayers > 1)
gMapYOffset = 96;
else
gMapYOffset = 181;
if (gMultiplayerLevels)
{
InitMultiplayerMap();
@ -978,9 +983,6 @@ void DrawMultiplayerMap(void)
else
yPos = 96;
if (MissionHeader->region == 0)
return;
DrawMultiplayerTargets();
pl = player;
@ -1094,10 +1096,18 @@ void DrawOverheadMap(void)
0
};
if (NumPlayers > 1)
{
if(MissionHeader->region != 0)
DrawMultiplayerMap();
return;
}
map_minX = gMapXOffset;
map_maxX = gMapXOffset + MAP_SIZE_W;
map_minY = gMapYOffset;
map_maxY = gMapYOffset + MAP_SIZE_H;
map_maxX = map_minX + MAP_SIZE_W;
map_maxY = map_minY + MAP_SIZE_H;
VECTOR translate = {
map_minX + MAP_SIZE_W/2,
@ -1105,15 +1115,6 @@ void DrawOverheadMap(void)
map_minY + MAP_SIZE_H/2
};
if (gMultiplayerLevels)
{
DrawMultiplayerMap();
return;
}
if (NumPlayers > 1)
return;
SetMapPos();
draw_box(map_minY, MAP_SIZE_H);
@ -1434,8 +1435,7 @@ void DrawOverheadMap(void)
drarea = (DR_AREA*)current->primptr;
SetDrawArea(drarea, &clipped_size);
addPrim(current->ot+1, drarea);
addPrim(current->ot + 1, drarea);
current->primptr += sizeof(DR_AREA);
}