67 lines
2 KiB
Text
67 lines
2 KiB
Text
function trigpad_gotHit() /* entry=273 class_id=0x04CD slot=0x06 */
|
|
{
|
|
var
|
|
referent, /* [BP+00h] type=0x69 */
|
|
ref, /* [BP+0Ah] type=0x69 */
|
|
vel, /* [BP+0Ch] type=0x69 */
|
|
a, /* [BP-02h] type=0x69 */
|
|
item, /* [BP-04h] type=0x24 */
|
|
elev; /* [BP-06h] type=0x24 */
|
|
|
|
set_info(0x020C, *(arg_06));
|
|
process_exclude();
|
|
a = ref;
|
|
FREE.slot_2B(vel, ref);
|
|
if (!retval) {
|
|
return;
|
|
}
|
|
else {
|
|
item = ref;
|
|
if (Item.getMapArray(arg_06) == 0) {
|
|
if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCompletelyOn(*(arg_06), item) != 0)) {
|
|
return;
|
|
}
|
|
else {
|
|
spawn FREE.waitNTimerTicks(pid, 1, 0x00000000);
|
|
suspend;
|
|
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
|
|
suspend;
|
|
while (!(1)) {
|
|
if (Item.getSurfaceWeight(arg_06) == 0) {
|
|
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
|
|
suspend;
|
|
}
|
|
else {
|
|
spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
|
|
suspend;
|
|
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
|
|
suspend;
|
|
/* loopscr value_u8=0x24 */
|
|
/* loopscr value_u8=0x3D */
|
|
/* loopscr value_u8=0x40 */
|
|
/* loopscr value_u8=0x25 */
|
|
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x6 */
|
|
while (!condition) {
|
|
while (!(Item.getStatus(elev) & 0x1000)) {
|
|
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
|
|
suspend;
|
|
}
|
|
spawn FREE.waitNTimerTicks(pid, 120, 0x00000000);
|
|
suspend;
|
|
/* global_address global_id=0x3C */
|
|
if (Item.getZ() >= (Item.getZ(elev) - 5)) {
|
|
ELEVAT.slot_21(Item.getZ(elev), elev);
|
|
if (!retval) {
|
|
spawn ELEVAT.slot_20(elev);
|
|
}
|
|
}
|
|
/* loopnext */
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|