Browse Source

Stylistic changes for OperateL1RDoor.

pull/287/head^2
Sergey Semushin 7 years ago committed by Anders Jenbo
parent
commit
82bbef8ab7
  1. 46
      Source/objects.cpp

46
Source/objects.cpp

@ -2352,7 +2352,7 @@ void RedoPlayerVision()
void OperateL1RDoor(int pnum, int oi, BOOL sendflag) void OperateL1RDoor(int pnum, int oi, BOOL sendflag)
{ {
int xp, yp, pn; int xp, yp;
if (object[oi]._oVar4 == 2) { if (object[oi]._oVar4 == 2) {
if (!deltaload) if (!deltaload)
@ -2376,30 +2376,30 @@ void OperateL1RDoor(int pnum, int oi, BOOL sendflag)
object[oi]._oVar4 = 1; object[oi]._oVar4 = 1;
object[oi]._oSelFlag = 2; object[oi]._oSelFlag = 2;
RedoPlayerVision(); RedoPlayerVision();
} else { return;
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) { if (!deltaload)
if (pnum == myplr && sendflag) PlaySfxLoc(IS_DOORCLOS, xp, object[oi]._oy);
NetSendCmdParam1(TRUE, CMD_CLOSEDOOR, oi); if (((dDead[xp][yp] != 0 ? 0 : 1) & (dMonster[xp][yp] != 0 ? 0 : 1) & (dItem[xp][yp] != 0 ? 0 : 1)) != 0) {
pn = object[oi]._oVar1; if (pnum == myplr && sendflag)
object[oi]._oVar4 = 0; NetSendCmdParam1(TRUE, CMD_CLOSEDOOR, oi);
object[oi]._oSelFlag = 3; object[oi]._oVar4 = 0;
ObjSetMicro(xp, yp, pn); object[oi]._oSelFlag = 3;
if (object[oi]._oVar2 != 50) { ObjSetMicro(xp, yp, object[oi]._oVar1);
ObjSetMicro(xp - 1, yp, object[oi]._oVar2); if (object[oi]._oVar2 != 50) {
} else { ObjSetMicro(xp - 1, yp, object[oi]._oVar2);
if (dPiece[xp - 1][yp] == 396)
ObjSetMicro(xp - 1, yp, 411);
else
ObjSetMicro(xp - 1, yp, 50);
}
object[oi]._oAnimFrame -= 2;
object[oi]._oPreFlag = FALSE;
RedoPlayerVision();
} else { } else {
object[oi]._oVar4 = 2; if (dPiece[xp - 1][yp] == 396)
ObjSetMicro(xp - 1, yp, 411);
else
ObjSetMicro(xp - 1, yp, 50);
} }
object[oi]._oAnimFrame -= 2;
object[oi]._oPreFlag = FALSE;
RedoPlayerVision();
} else {
object[oi]._oVar4 = 2;
} }
} }
// 676190: using guessed type int deltaload; // 676190: using guessed type int deltaload;

Loading…
Cancel
Save