Browse Source

[Diablo] 🐛 Fix double rendering or door frames in Catacombs

pull/1281/head
Anders Jenbo 5 years ago
parent
commit
ce0c323ed3
  1. 10
      Source/drlg_l2.cpp
  2. 8
      Source/objects.cpp

10
Source/drlg_l2.cpp

@ -3279,10 +3279,6 @@ static void DRLG_InitL2Vals()
pc = 6;
} else if (dPiece[i][j] == 553) {
pc = 6;
} else if (dPiece[i][j] == 13) {
pc = 5;
} else if (dPiece[i][j] == 17) {
pc = 6;
} else {
continue;
}
@ -3364,12 +3360,6 @@ void LoadL2Dungeon(const char *sFileName, int vx, int vy)
if (dPiece[i][j] == 553) {
pc = 6;
}
if (dPiece[i][j] == 13) {
pc = 5;
}
if (dPiece[i][j] == 17) {
pc = 6;
}
dSpecial[i][j] = pc;
}
}

8
Source/objects.cpp

@ -2280,10 +2280,6 @@ void ObjL2Special(int x1, int y1, int x2, int y2)
dSpecial[i][j] = 6;
if (dPiece[i][j] == 553)
dSpecial[i][j] = 6;
if (dPiece[i][j] == 13)
dSpecial[i][j] = 5;
if (dPiece[i][j] == 17)
dSpecial[i][j] = 6;
}
}
for (j = y1; j <= y2; j++) {
@ -2566,6 +2562,7 @@ void OperateL2RDoor(int pnum, int oi, bool sendflag)
if (!deltaload)
PlaySfxLoc(IS_DOOROPEN, object[oi]._ox, object[oi]._oy);
ObjSetMicro(xp, yp, 17);
dSpecial[xp][yp] = 6;
object[oi]._oAnimFrame += 2;
object[oi]._oPreFlag = TRUE;
object[oi]._oVar4 = 1;
@ -2585,6 +2582,7 @@ void OperateL2RDoor(int pnum, int oi, bool sendflag)
object[oi]._oVar4 = 0;
object[oi]._oSelFlag = 3;
ObjSetMicro(xp, yp, 540);
dSpecial[xp][yp] = 0;
object[oi]._oAnimFrame -= 2;
object[oi]._oPreFlag = FALSE;
RedoPlayerVision();
@ -2611,6 +2609,7 @@ void OperateL2LDoor(int pnum, int oi, BOOL sendflag)
if (!deltaload)
PlaySfxLoc(IS_DOOROPEN, object[oi]._ox, object[oi]._oy);
ObjSetMicro(xp, yp, 13);
dSpecial[xp][yp] = 5;
object[oi]._oAnimFrame += 2;
object[oi]._oPreFlag = TRUE;
object[oi]._oVar4 = 1;
@ -2630,6 +2629,7 @@ void OperateL2LDoor(int pnum, int oi, BOOL sendflag)
object[oi]._oVar4 = 0;
object[oi]._oSelFlag = 3;
ObjSetMicro(xp, yp, 538);
dSpecial[xp][yp] = 0;
object[oi]._oAnimFrame -= 2;
object[oi]._oPreFlag = FALSE;
RedoPlayerVision();

Loading…
Cancel
Save