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

Function OperateLever

Source/objects.cpp:1924–1942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1922}
1923
1924void OperateLever(Object &object, bool sendmsg)
1925{
1926 if (object._oSelFlag == 0) {
1927 return;
1928 }
1929
1930 PlaySfxLoc(IS_LEVER, object.position);
1931
1932 UpdateLeverState(object);
1933
1934 if (currlevel == 24) {
1935 PlaySfxLoc(IS_CROPEN, { UberRow, UberCol });
1936 Quests[Q_NAKRUL]._qactive = QUEST_DONE;
1937 NetSendCmdQuest(true, Quests[Q_NAKRUL]);
1938 }
1939
1940 if (sendmsg)
1941 NetSendCmdLoc(MyPlayerId, false, CMD_OPERATEOBJ, object.position);
1942}
1943
1944void OperateBook(Player &player, Object &book, bool sendmsg)
1945{

Callers 2

OperateObjectFunction · 0.85
SyncOpObjectFunction · 0.85

Calls 4

UpdateLeverStateFunction · 0.85
NetSendCmdQuestFunction · 0.85
NetSendCmdLocFunction · 0.85
PlaySfxLocFunction · 0.70

Tested by

no test coverage detected