Crusader_Decomp/USECODE/EUSECODE_extracted/pseudocode/KEYPADEW/slot_01_use.txt

29 lines
722 B
Text

function keypadew_use() /* entry=243 class_id=0x044C slot=0x01 */
{
var
referent, /* [BP+00h] type=0x69 */
alreadyPassed; /* [BP-01h] type=0x62 */
set_info(0x0207, *(arg_06));
process_exclude();
if (Item.getMapArray(arg_06) == 0) {
alreadyPassed = (Item.getStatus(arg_06) & 4);
if (alreadyPassed == 0) {
if (!World.getAlertActive()) {
while (!AudioProcess.isSFXPlayingForObject(123, arg_06)) {
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
}
return;
}
spawn KEYPAD.slot_20(pid, arg_06);
suspend;
}
else {
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
suspend;
}
return;
}
return;
}