allow to leave PC in other map

This commit is contained in:
Ondřej Novák 2025-02-04 15:08:35 +01:00
parent 5c4cfaf314
commit 33fa026576
23 changed files with 515 additions and 319 deletions

View file

@ -556,26 +556,30 @@ void draw_automap(int xr,int yr)
{
int j,l=-1;
for(j=0;j<POCET_POSTAV;j++)
{
if (postavy[j].used)
if (postavy[j].sektor==i) {
if (postavy[j].groupnum==cur_group) break;
l=j;
}
}
if (j==POCET_POSTAV) j=l;
if (j!=-1)
{
char c[2];
for (j = 0; j < POCET_POSTAV; j++) {
if (postavy[j].used && postavy[j].sektor == i
&& postavy[j].inmaphash
== current_map_hash) {
if (postavy[j].groupnum == cur_group)
break;
l = j;
}
}
if (j == POCET_POSTAV)
j = l;
if (j != -1) {
char c[2];
position(x+1,y+1);
set_font(H_FSYMB,postavy[j].groupnum==cur_group?RGB888(255,255,255):barvy_skupin[postavy[j].groupnum]);
c[0]=postavy[j].direction+4;
c[1]=0;
outtext(c);
}
}
position(x + 1, y + 1);
set_font(H_FSYMB,
postavy[j].groupnum == cur_group ?
RGB888(255, 255, 255) :
barvy_skupin[postavy[j].groupnum]);
c[0] = postavy[j].direction + 4;
c[1] = 0;
outtext(c);
}
}
}
}
}