-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,br_loadout_rearrange].cs2
77 lines (77 loc) · 1.97 KB
/
[clientscript,br_loadout_rearrange].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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// 3069
[clientscript,br_loadout_rearrange](component $component0, int $comsubid1, component $drop2, int $dropsubid3, int $int4, component $component5, component $component6, component $drop7, component $component8)
def_namedobj $namedobj9 = enum(int, namedobj, enum_2630, $int4);
if ($namedobj9 = null) {
return;
}
def_int $size10 = inv_size(inv);
def_int $size11 = inv_size(worn);
def_int $int12 = 0;
def_int $int13 = 0;
def_int $int14 = -1;
if ($component0 = $component6) {
if ($comsubid1 >= 0 & $comsubid1 < $size10) {
$int14 = $comsubid1;
}
$int12 = 1;
}
def_int $int15 = -1;
if ($drop2 = $component6) {
if ($dropsubid3 >= 0 & $dropsubid3 < $size10) {
$int15 = $dropsubid3;
}
$int13 = 1;
}
def_int $int16 = $size11;
if ($int14 = -1 | $int15 = -1) {
while ($int16 > 0) {
$int16 = calc($int16 - 1);
if ($int14 = -1 & enum(int, component, enum_2632, $int16) = $component0) {
$int14, $int12 = $int16, 0;
}
if ($int15 = -1 & enum(int, component, enum_2632, $int16) = $drop2) {
$int15, $int13 = $int16, 0;
}
}
}
if ($int14 = -1) {
return;
}
if ($drop2 = $drop7) {
sound_synth(interface_select1, 1, 0);
if ($int12 = 1) {
~br_loadout_set_inv($int14, 0);
} else {
~br_loadout_set_worn($int14, 0);
}
~br_loadout_drawloadout($component5, $component6, $drop7, $component8);
return;
}
if ($int15 = -1) {
return;
}
def_int $int17 = 0;
if ($int13 = 0) {
if (oc_param($namedobj9, param_850) ! $int15) {
return;
}
$int17 = ~br_loadout_get_worn($int15);
} else {
$int17 = ~br_loadout_get_inv($int15);
}
def_namedobj $namedobj18 = enum(int, namedobj, enum_2630, $int17);
if ($namedobj18 ! null & $int12 = 0 & oc_param($namedobj18, param_850) ! $int14) {
return;
}
sound_synth(interface_select1, 1, 0);
if ($int13 = 1) {
~br_loadout_set_inv($int15, $int4);
} else {
~br_loadout_set_worn($int15, $int4);
}
if ($int12 = 1) {
~br_loadout_set_inv($int14, $int17);
} else {
~br_loadout_set_worn($int14, $int17);
}
~br_loadout_drawloadout($component5, $component6, $drop7, $component8);