diff --git a/Source/objects.cpp b/Source/objects.cpp index 8ff0d9573..8e5948f69 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -2359,7 +2359,7 @@ void OperateL1RDoor(int pnum, int oi, DIABOOL sendflag) } } -void OperateL1LDoor(int pnum, int oi, BOOL sendflag) +void OperateL1LDoor(int pnum, int oi, DIABOOL sendflag) { int xp, yp; @@ -2374,6 +2374,28 @@ void OperateL1LDoor(int pnum, int oi, BOOL sendflag) if (object[oi]._oVar4 == 0) { if (pnum == myplr && sendflag) NetSendCmdParam1(TRUE, CMD_OPENDOOR, oi); +#ifdef HELLFIRE + if (currlevel < 21) { + if (!deltaload) + PlaySfxLoc(IS_DOOROPEN, object[oi]._ox, object[oi]._oy); + } else { + if (!deltaload) + PlaySfxLoc(IS_CROPEN, object[oi]._ox, object[oi]._oy); + } + if (currlevel < 21) { + if (object[oi]._oVar1 == 214) + ObjSetMicro(xp, yp, 408); + else + ObjSetMicro(xp, yp, 393); + } else { + ObjSetMicro(xp, yp, 206); + } + if (currlevel < 17) { + dArch[xp][yp] = 7; + } else { + dArch[xp][yp] = 1; + } +#else if (!deltaload) PlaySfxLoc(IS_DOOROPEN, object[oi]._ox, object[oi]._oy); if (object[oi]._oVar1 == 214) @@ -2381,6 +2403,7 @@ void OperateL1LDoor(int pnum, int oi, BOOL sendflag) else ObjSetMicro(xp, yp, 393); dArch[xp][yp] = 7; +#endif objects_set_door_piece(xp - 1, yp); object[oi]._oAnimFrame += 2; object[oi]._oPreFlag = TRUE; @@ -2391,14 +2414,31 @@ void OperateL1LDoor(int pnum, int oi, BOOL sendflag) return; } +#ifdef HELLFIRE + if (currlevel < 21) { + if (!deltaload) + PlaySfxLoc(IS_DOORCLOS, xp, object[oi]._oy); + } else { + if (!deltaload) + PlaySfxLoc(IS_CRCLOS, xp, object[oi]._oy); + } + BOOLEAN dok = !dMonster[xp][yp]; + dok = dok && !dItem[xp][yp]; + dok = dok && !dDead[xp][yp]; + if (dok) { +#else if (!deltaload) PlaySfxLoc(IS_DOORCLOS, xp, object[oi]._oy); if (((dDead[xp][yp] != 0 ? 0 : 1) & (dMonster[xp][yp] != 0 ? 0 : 1) & (dItem[xp][yp] != 0 ? 0 : 1)) != 0) { +#endif if (pnum == myplr && sendflag) NetSendCmdParam1(TRUE, CMD_CLOSEDOOR, oi); object[oi]._oVar4 = 0; object[oi]._oSelFlag = 3; ObjSetMicro(xp, yp, object[oi]._oVar1); +#ifdef HELLFIRE + if (currlevel < 17) { +#endif if (object[oi]._oVar2 != 50) { ObjSetMicro(xp, yp - 1, object[oi]._oVar2); } else { @@ -2407,6 +2447,18 @@ void OperateL1LDoor(int pnum, int oi, BOOL sendflag) else ObjSetMicro(xp, yp - 1, 50); } +#ifdef HELLFIRE + } else { + if (object[oi]._oVar2 != 86) { + ObjSetMicro(xp, yp - 1, object[oi]._oVar2); + } else { + if (dPiece[xp][yp - 1] == 210) + ObjSetMicro(xp, yp - 1, 234); + else + ObjSetMicro(xp, yp - 1, 86); + } + } +#endif object[oi]._oAnimFrame -= 2; object[oi]._oPreFlag = FALSE; RedoPlayerVision(); diff --git a/Source/objects.h b/Source/objects.h index 99d952327..7aeccfdd6 100644 --- a/Source/objects.h +++ b/Source/objects.h @@ -108,7 +108,7 @@ void ObjL2Special(int x1, int y1, int x2, int y2); void DoorSet(int oi, int dx, int dy); void RedoPlayerVision(); void OperateL1RDoor(int pnum, int oi, DIABOOL sendflag); -void OperateL1LDoor(int pnum, int oi, BOOL sendflag); +void OperateL1LDoor(int pnum, int oi, DIABOOL sendflag); void OperateL2RDoor(int pnum, int oi, BOOL sendflag); void OperateL2LDoor(int pnum, int oi, BOOL sendflag); void OperateL3RDoor(int pnum, int oi, BOOL sendflag);