MCPcopy Create free account
hub / github.com/diasurgical/devilution / OperateL1Door

Function OperateL1Door

Source/objects.cpp:2348–2358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2346}
2347
2348void OperateL1Door(int pnum, int i, BOOL sendflag)
2349{
2350 int dpx, dpy;
2351
2352 dpx = abs(object[i]._ox - plr[pnum].WorldX);
2353 dpy = abs(object[i]._oy - plr[pnum].WorldY);
2354 if (dpx == 1 && dpy <= 1 && object[i]._otype == OBJ_L1LDOOR)
2355 OperateL1LDoor(pnum, i, sendflag);
2356 if (dpx <= 1 && dpy == 1 && object[i]._otype == OBJ_L1RDOOR)
2357 OperateL1RDoor(pnum, i, sendflag);
2358}
2359
2360void OperateLever(int pnum, int i)
2361{

Callers 1

OperateObjectFunction · 0.85

Calls 2

OperateL1LDoorFunction · 0.85
OperateL1RDoorFunction · 0.85

Tested by

no test coverage detected