1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

small bugfix

This commit is contained in:
mateuszb 2007-07-31 14:29:40 +00:00
parent 9c5bc83b16
commit 7789e9e01c

View File

@ -195,10 +195,10 @@ void CMapHandler::init()
undRoadBitmaps[i][j] = NULL; undRoadBitmaps[i][j] = NULL;
else else
{ {
if(reader->map.terrain[i-Woff][j-Hoff].malle) if(reader->map.undergroungTerrain[i-Woff][j-Hoff].malle)
{ {
undRoadBitmaps[i][j] = roadDefs[reader->map.undergroungTerrain[i-Woff][j-Hoff].malle-1]->ourImages[reader->map.undergroungTerrain[i-Woff][j-Hoff].roadDir].bitmap; undRoadBitmaps[i][j] = roadDefs[reader->map.undergroungTerrain[i-Woff][j-Hoff].malle-1]->ourImages[reader->map.undergroungTerrain[i-Woff][j-Hoff].roadDir].bitmap;
int cDir = reader->map.terrain[i-Woff][j-Hoff].roadDir; int cDir = reader->map.undergroungTerrain[i-Woff][j-Hoff].roadDir;
if(cDir==0 || cDir==1 || cDir==2 || cDir==3 || cDir==4 || cDir==5) if(cDir==0 || cDir==1 || cDir==2 || cDir==3 || cDir==4 || cDir==5)
{ {
if(i-Woff+1<reader->map.width && j-Hoff-1>0 && reader->map.undergroungTerrain[i-Woff+1][j-Hoff].malle && reader->map.undergroungTerrain[i-Woff][j-Hoff-1].malle) if(i-Woff+1<reader->map.width && j-Hoff-1>0 && reader->map.undergroungTerrain[i-Woff+1][j-Hoff].malle && reader->map.undergroungTerrain[i-Woff][j-Hoff-1].malle)