This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path[clientscript,br_loadout_rearrange].cs2
77 lines (77 loc) · 2.12 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, int $int5, enum $enum6, enum $enum7, component $component8, component $component9, component $drop10, component $component11)
def_namedobj $namedobj12 = enum(int, namedobj, $enum6, $int4);
if ($namedobj12 = null) {
return;
}
def_int $size13 = inv_size(inv);
def_int $size14 = inv_size(worn);
def_int $int15 = 0;
def_int $int16 = 0;
def_int $int17 = -1;
if ($component0 = $component9) {
if ($comsubid1 >= 0 & $comsubid1 < $size13) {
$int17 = $comsubid1;
}
$int15 = 1;
}
def_int $int18 = -1;
if ($drop2 = $component9) {
if ($dropsubid3 >= 0 & $dropsubid3 < $size13) {
$int18 = $dropsubid3;
}
$int16 = 1;
}
def_int $int19 = $size14;
if ($int17 = -1 | $int18 = -1) {
while ($int19 > 0) {
$int19 = calc($int19 - 1);
if ($int17 = -1 & enum(int, component, $enum7, $int19) = $component0) {
$int17, $int15 = $int19, 0;
}
if ($int18 = -1 & enum(int, component, $enum7, $int19) = $drop2) {
$int18, $int16 = $int19, 0;
}
}
}
if ($int17 = -1) {
return;
}
if ($drop2 = $drop10) {
sound_synth(interface_select1, 1, 0);
if ($int15 = 1) {
~br_loadout_set_inv($int5, $int17, 0);
} else {
~br_loadout_set_worn($int5, $int17, 0);
}
~br_loadout_drawloadout($int5, $enum6, $enum7, $component8, $component9, $drop10, $component11);
return;
}
if ($int18 = -1) {
return;
}
def_int $int20 = 0;
if ($int16 = 0) {
if (oc_param($namedobj12, loadout_iteminfo) ! $int18) {
return;
}
$int20 = ~br_loadout_get_worn($int5, $int18);
} else {
$int20 = ~br_loadout_get_inv($int5, $int18);
}
def_namedobj $namedobj21 = enum(int, namedobj, $enum6, $int20);
if ($namedobj21 ! null & $int15 = 0 & oc_param($namedobj21, loadout_iteminfo) ! $int17) {
return;
}
sound_synth(interface_select1, 1, 0);
if ($int16 = 1) {
~br_loadout_set_inv($int5, $int18, $int4);
} else {
~br_loadout_set_worn($int5, $int18, $int4);
}
if ($int15 = 1) {
~br_loadout_set_inv($int5, $int17, $int20);
} else {
~br_loadout_set_worn($int5, $int17, $int20);
}
~br_loadout_drawloadout($int5, $enum6, $enum7, $component8, $component9, $drop10, $component11);