MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / UpdateCircle

Function UpdateCircle

Source/objects.cpp:1594–1635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1592}
1593
1594void UpdateCircle(Object &circle)
1595{
1596 Player *playerOnCircle = PlayerAtPosition(circle.position);
1597
1598 if (!playerOnCircle) {
1599 if (circle._otype == OBJ_MCIRCLE1)
1600 circle._oAnimFrame = 1;
1601 if (circle._otype == OBJ_MCIRCLE2)
1602 circle._oAnimFrame = 3;
1603 circle._oVar6 = 0;
1604 return;
1605 }
1606
1607 if (circle._otype == OBJ_MCIRCLE1)
1608 circle._oAnimFrame = 2;
1609 if (circle._otype == OBJ_MCIRCLE2)
1610 circle._oAnimFrame = 4;
1611 if (circle.position == Point { 45, 47 }) {
1612 circle._oVar6 = 2;
1613 } else if (circle.position == Point { 26, 46 }) {
1614 circle._oVar6 = 1;
1615 } else {
1616 circle._oVar6 = 0;
1617 }
1618 if (circle.position == Point { 35, 36 } && circle._oVar5 == 3) {
1619 circle._oVar6 = 4;
1620 if (Quests[Q_BETRAYER]._qvar1 <= 4) {
1621 LoadingMapObjects = true;
1622 ObjChangeMap(circle._oVar1, circle._oVar2, circle._oVar3, circle._oVar4);
1623 LoadingMapObjects = false;
1624 Quests[Q_BETRAYER]._qvar1 = 4;
1625 NetSendCmdQuest(true, Quests[Q_BETRAYER]);
1626 }
1627 AddMissile(playerOnCircle->position.tile, { 35, 46 }, Direction::South, MissileID::Phasing, TARGET_BOTH, playerOnCircle->getId(), 0, 0);
1628 if (playerOnCircle == MyPlayer) {
1629 LastMouseButtonAction = MouseActionType::None;
1630 sgbMouseDown = CLICK_NONE;
1631 }
1632 ClrPlrPath(*playerOnCircle);
1633 StartStand(*playerOnCircle, Direction::South);
1634 }
1635}
1636
1637void ObjectStopAnim(Object &object)
1638{

Callers 1

ProcessObjectsFunction · 0.85

Calls 7

PlayerAtPositionFunction · 0.85
ObjChangeMapFunction · 0.85
NetSendCmdQuestFunction · 0.85
AddMissileFunction · 0.85
ClrPlrPathFunction · 0.85
StartStandFunction · 0.85
getIdMethod · 0.65

Tested by

no test coverage detected