|
3 | 3 | (part 1) |
4 | 4 | ]] |
5 | 5 |
|
| 6 | +--- x86 branch is on an outdated luajit that doesn't support binary literals. Woo |
| 7 | +-- i love the game "garry's mod" created by Garry Newman as a mod for Valve's Source game engine and released in December 2004, before being expanded into a standalone release that was published by Valve in November 2006. |
| 8 | +local function b(s) |
| 9 | + return tonumber(s, 2) |
| 10 | +end |
| 11 | + |
6 | 12 | -- Modification Flags |
7 | 13 | -- If you ever change a setting of the Interface object, will add one of these flags to it. |
8 | 14 | -- This will be sent to the client to know what to read in the net message to save networking |
9 | 15 | local Modify = { |
10 | | - volume = 0b000000000001, |
11 | | - time = 0b000000000010, |
12 | | - pos = 0b000000000100, |
13 | | - playing = 0b000000001000, |
14 | | - playback_rate = 0b000000010000, |
15 | | - direction = 0b000000100000, |
16 | | - parented = 0b000001000000, |
17 | | - radius = 0b000010000000, |
18 | | - looping = 0b000100000000, |
19 | | - mode = 0b001000000000, |
20 | | - reserved = 0b010000000000, -- pan maybe? |
21 | | - |
22 | | - destroyed = 0b100000000000, |
23 | | - |
24 | | - all = 0b111111111111 |
| 16 | + volume = b'000000000001', |
| 17 | + time = b'000000000010', |
| 18 | + pos = b'000000000100', |
| 19 | + playing = b'000000001000', |
| 20 | + playback_rate = b'000000010000', |
| 21 | + direction = b'000000100000', |
| 22 | + parented = b'000001000000', |
| 23 | + radius = b'000010000000', |
| 24 | + looping = b'000100000000', |
| 25 | + mode = b'001000000000', |
| 26 | + reserved = b'010000000000', -- pan maybe? |
| 27 | + |
| 28 | + destroyed = b'100000000000', |
| 29 | + |
| 30 | + all = b'111111111111' |
25 | 31 | } |
26 | 32 |
|
27 | 33 | -- Bits needed to send a bitflag of all the modifications |
|
0 commit comments