-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,add_overlaytimer_inner].cs2
37 lines (37 loc) · 1.33 KB
/
[proc,add_overlaytimer_inner].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
// 5480
[proc,add_overlaytimer_inner](int $int0, entityoverlay $entityoverlay1, int $clock2, int $int3, int $colour4, int $int5)
def_int $int6 = calc($clock2 + $int3);
def_int $int7 = calc(clientclock - $clock2);
def_int $int8 = ~minmax(1, 65536, scale($int7, $int3, 65536));
switch_int ($int5) {
case 1 :
$int8 = calc(65536 - $int8);
}
if (if_find_entityoverlay($entityoverlay1) = ^true) {
cc_setontimer("overlaytimer_update($entityoverlay1, $clock2, $int3, $int5)");
cc_create_entityoverlay($entityoverlay1, ^iftype_arc, 0);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setcolour($colour4);
cc_setfill(true);
cc_settrans(200);
cc_setlinewid(1);
cc_setarc(0, 65536);
cc_create_entityoverlay($entityoverlay1, ^iftype_arc, 1);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setcolour($colour4);
cc_setfill(true);
cc_settrans(128);
cc_setlinewid(1);
cc_setarc(0, $int8);
cc_create_entityoverlay($entityoverlay1, ^iftype_arc, 2);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setcolour($colour4);
cc_setfill(false);
cc_setlinewid(1);
cc_setarc(0, $int8);
} else {
~debug_mes("Overlay Timers: Failed to get entity overlay.");
}