-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,trail_slidepuzzle_op].cs2
62 lines (62 loc) · 1.83 KB
/
[clientscript,trail_slidepuzzle_op].cs2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// 691
[clientscript,trail_slidepuzzle_op](int $opindex0, component $component1, int $comsubid2, int $int3, int $int4, int $int5, int $int6)
if ($opindex0 ! 1) {
return;
}
def_int $int7 = ~trail_slidepuzzle_getint($comsubid2);
if ($int7 = -1) {
return;
}
def_int $int8 = calc($comsubid2 % 5);
def_int $int9 = calc($comsubid2 / 5);
def_int $int10 = -1;
def_int $int11 = -1;
if ($int8 > 0) {
$int10 = calc($int8 - 1 + $int9 * 5);
$int11 = ~trail_slidepuzzle_getint($int10);
if ($int11 = -1) {
sound_synth(slide_puzzle, 1, 0);
~trail_slidepuzzle_setint($int10, $int7);
~trail_slidepuzzle_setint($comsubid2, -1);
~trail_slidepuzzle_position($component1, $int3, $int4, $int5, $int6);
%varcint110 = clientclock;
return;
}
}
if ($int8 < calc(5 - 1)) {
$int10 = calc($int8 + 1 + $int9 * 5);
$int11 = ~trail_slidepuzzle_getint($int10);
if ($int11 = -1) {
sound_synth(slide_puzzle, 1, 0);
~trail_slidepuzzle_setint($int10, $int7);
~trail_slidepuzzle_setint($comsubid2, -1);
~trail_slidepuzzle_position($component1, $int3, $int4, $int5, $int6);
%varcint110 = clientclock;
return;
}
}
if ($int9 > 0) {
$int10 = calc($int8 + ($int9 - 1) * 5);
$int11 = ~trail_slidepuzzle_getint($int10);
if ($int11 = -1) {
sound_synth(slide_puzzle, 1, 0);
~trail_slidepuzzle_setint($int10, $int7);
~trail_slidepuzzle_setint($comsubid2, -1);
~trail_slidepuzzle_position($component1, $int3, $int4, $int5, $int6);
%varcint110 = clientclock;
return;
}
}
if ($int9 < calc(5 - 1)) {
$int10 = calc($int8 + ($int9 + 1) * 5);
$int11 = ~trail_slidepuzzle_getint($int10);
if ($int11 = -1) {
sound_synth(slide_puzzle, 1, 0);
~trail_slidepuzzle_setint($int10, $int7);
~trail_slidepuzzle_setint($comsubid2, -1);
~trail_slidepuzzle_position($component1, $int3, $int4, $int5, $int6);
%varcint110 = clientclock;
return;
}
}
sound_synth(knife_break, 1, 0);