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

Function UpdateLeverState

Source/objects.cpp:1900–1922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1898}
1899
1900void UpdateLeverState(Object &object)
1901{
1902 if (object._oSelFlag == 0) {
1903 return;
1904 }
1905
1906 object._oSelFlag = 0;
1907 object._oAnimFrame++;
1908
1909 if (currlevel == 16 && !AreAllLeversActivated(object._oVar8))
1910 return;
1911
1912 if (currlevel == 24) {
1913 SyncNakrulRoom();
1914 IsUberLeverActivated = true;
1915 return;
1916 }
1917
1918 if (setlevel && setlvlnum == SL_VILEBETRAYER)
1919 ObjectAtPosition({ 35, 36 })._oVar5++;
1920
1921 ObjChangeMap(object._oVar1, object._oVar2, object._oVar3, object._oVar4);
1922}
1923
1924void OperateLever(Object &object, bool sendmsg)
1925{

Callers 2

OperateLeverFunction · 0.85
DeltaSyncOpObjectFunction · 0.85

Calls 3

AreAllLeversActivatedFunction · 0.85
SyncNakrulRoomFunction · 0.85
ObjChangeMapFunction · 0.85

Tested by

no test coverage detected