Skip to content

Commit

Permalink
Fix volume not being transmitted
Browse files Browse the repository at this point in the history
Apparently I don't know how enums work.

Zero would mean no flags at all, so we were transmitting no changes when the user wanted to change volume.
  • Loading branch information
Vurv78 committed Jun 26, 2021
1 parent eeecdab commit b5f1344
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lua/autorun/webaudio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
-- If you ever change a setting of the Interface object, will add one of these flags to it.
-- This will be sent to the client to know what to read in the net message to save networking
local Modify = {
volume = 0,
time = 1,
pos = 2,
playing = 4,
playback_rate = 8,
direction = 16,
parented = 32,
radius = 64,
looping = 128,

destroyed = 256
volume = 1,
time = 2,
pos = 4,
playing = 8,
playback_rate = 16,
direction = 32,
parented = 64,
radius = 128,
looping = 256,

destroyed = 512
}

local function hasModifyFlag(...) return bit.band(...) ~= 0 end
Expand Down

0 comments on commit b5f1344

Please sign in to comment.