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

Function BreakCrux

Source/objects.cpp:4010–4036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4008}
4009
4010void BreakCrux(int i)
4011{
4012 int j, oi;
4013 BOOL triggered;
4014
4015 object[i]._oAnimFlag = 1;
4016 object[i]._oAnimFrame = 1;
4017 object[i]._oAnimDelay = 1;
4018 object[i]._oSolidFlag = TRUE;
4019 object[i]._oMissFlag = TRUE;
4020 object[i]._oBreak = -1;
4021 object[i]._oSelFlag = 0;
4022 triggered = TRUE;
4023 for (j = 0; j < nobjects; j++) {
4024 oi = objectactive[j];
4025 if (object[oi]._otype != OBJ_CRUX1 && object[oi]._otype != OBJ_CRUX2 && object[oi]._otype != OBJ_CRUX3)
4026 continue;
4027 if (object[i]._oVar8 != object[oi]._oVar8 || object[oi]._oBreak == -1)
4028 continue;
4029 triggered = FALSE;
4030 }
4031 if (!triggered)
4032 return;
4033 if (!deltaload)
4034 PlaySfxLoc(IS_LEVER, object[i]._ox, object[i]._oy);
4035 ObjChangeMap(object[i]._oVar1, object[i]._oVar2, object[i]._oVar3, object[i]._oVar4);
4036}
4037
4038void BreakBarrel(int pnum, int i, int dam, BOOL forcebreak, int sendmsg)
4039{

Callers 1

BreakObjectFunction · 0.85

Calls 2

PlaySfxLocFunction · 0.85
ObjChangeMapFunction · 0.85

Tested by

no test coverage detected