MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / aMatCenPuzzleSwitchF

Function aMatCenPuzzleSwitchF

scripts/LEVEL15.cpp:1364–1396  ·  view source on GitHub ↗

$$ACTION Scripts MatCen Puzzle: Hit Switch F by [o:Player] aMatCenPuzzleSwitchF The Player has shot switch F The Player has shot switch F $$END */

Source from the content-addressed store, hash-verified

1362$$END
1363*/
1364void aMatCenPuzzleSwitchF(int Player) {
1365 if (MagicMatCenSwitchSequence == 5)
1366 return;
1367
1368 if (!qUserFlag(MatCenSwitchFON)) {
1369 PlayOnAnimation(MatCenSwitchF);
1370 aUserFlagSet(MatCenSwitchFON, true);
1371
1372 if (MatCenStateB == 0) {
1373 SetMatCenPegToLevel1(MatCen2Peg);
1374 SetMatCenToLevel1(MatCen2);
1375 MatCenStateB = 1;
1376 } else {
1377 SetMatCenPegToLevel2(MatCen2Peg);
1378 SetMatCenToLevel2(MatCen2);
1379 MatCenStateB = 2;
1380 }
1381
1382 if (MatCenStateD == 0) {
1383 SetMatCenPegToLevel1(MatCen4Peg);
1384 SetMatCenToLevel1(MatCen4);
1385 MatCenStateD = 1;
1386 } else {
1387 SetMatCenPegToLevel2(MatCen4Peg);
1388 SetMatCenToLevel2(MatCen4);
1389 MatCenStateD = 2;
1390 }
1391
1392 MagicMatCenSwitchSequence = -1;
1393
1394 aShowHUDMessage(GetMyMessage(MatCenSwitchFOn));
1395 }
1396}
1397
1398/*
1399$$ACTION

Callers 1

CallEventMethod · 0.85

Calls 9

qUserFlagFunction · 0.85
PlayOnAnimationFunction · 0.85
aUserFlagSetFunction · 0.85
SetMatCenPegToLevel1Function · 0.85
SetMatCenToLevel1Function · 0.85
SetMatCenPegToLevel2Function · 0.85
SetMatCenToLevel2Function · 0.85
aShowHUDMessageFunction · 0.85
GetMyMessageFunction · 0.85

Tested by

no test coverage detected