64 lines
1.6 KiB
Text
64 lines
1.6 KiB
Text
function wshockew_gotHit() /* entry=245 class_id=0x044E slot=0x06 */
|
|
{
|
|
var
|
|
referent, /* [BP+00h] type=0x69 */
|
|
ref, /* [BP+0Ah] type=0x69 */
|
|
vel, /* [BP+0Ch] type=0x69 */
|
|
item, /* [BP-02h] type=0x24 */
|
|
n, /* [BP-04h] type=0x24 */
|
|
x, /* [BP-06h] type=0x69 */
|
|
y, /* [BP-08h] type=0x69 */
|
|
y1, /* [BP-0Ah] type=0x69 */
|
|
z, /* [BP-0Ch] type=0x69 */
|
|
z1, /* [BP-0Eh] type=0x69 */
|
|
shocker, /* [BP-10h] type=0x24 */
|
|
a, /* [BP-12h] type=0x69 */
|
|
b, /* [BP-14h] type=0x69 */
|
|
c, /* [BP-16h] type=0x69 */
|
|
d, /* [BP-18h] type=0x69 */
|
|
e, /* [BP-1Ah] type=0x69 */
|
|
shockCount; /* [BP-1Ch] type=0x69 */
|
|
|
|
set_info(0x020C, *(arg_06));
|
|
process_exclude();
|
|
item = ref;
|
|
if (!Actor.isNPC(item)) {
|
|
n = item;
|
|
while (Item.overlaps(ref, arg_06) == 1) {
|
|
x = Item.getX(arg_06);
|
|
y = Item.getCY(arg_06);
|
|
y1 = Item.getY(arg_06);
|
|
z = Item.getCZ(item);
|
|
z1 = Item.getZ(item);
|
|
a = (y1 - y);
|
|
a = (a * 2);
|
|
b = (z - z1);
|
|
b = ((b / 2) * 3);
|
|
FREE.slot_20(2);
|
|
c = (retval + 1);
|
|
while (c == 0) {
|
|
FREE.slot_20(a);
|
|
d = retval;
|
|
d = (y1 - d);
|
|
y = d;
|
|
FREE.slot_20(b);
|
|
e = retval;
|
|
e = (e + z1);
|
|
z = e;
|
|
if (!Item.create(0, 0x045A, shocker)) {
|
|
c = 1;
|
|
shockCount = (1 + shockCount);
|
|
}
|
|
FREE.slot_20(pid, 30);
|
|
spawn FREE.waitNTimerTicks(retval, 0x00000000);
|
|
suspend;
|
|
c = (c - 1);
|
|
}
|
|
spawn FREE.waitNTimerTicks(pid, 60, 0x00000000);
|
|
suspend;
|
|
}
|
|
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|