Skip to content

Commit d7fd83d

Browse files
committed
Fix x86 issue
Fixes #53
1 parent 4b8d3b3 commit d7fd83d

1 file changed

Lines changed: 21 additions & 15 deletions

File tree

lua/autorun/webaudio.lua

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,31 @@
33
(part 1)
44
]]
55

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+
612
-- Modification Flags
713
-- If you ever change a setting of the Interface object, will add one of these flags to it.
814
-- This will be sent to the client to know what to read in the net message to save networking
915
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'
2531
}
2632

2733
-- Bits needed to send a bitflag of all the modifications

0 commit comments

Comments
 (0)