Skip to content

Commit

Permalink
add min radius in the config
Browse files Browse the repository at this point in the history
  • Loading branch information
XLegland authored and gdevillele committed Mar 25, 2024
1 parent 488a85b commit d73f6f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/modules/sfx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local sfx = {
Position = Number3(0, 0, 0),
Volume = 1,
Radius = 600,
MinRadius = 200,
Spatialized = true,
Pitch = 1.0,
},
Expand All @@ -25,6 +26,7 @@ local mt = {
recycled.Position = config.Position or self.defaultConfig.Position
recycled.Volume = config.Volume or self.defaultConfig.Volume
recycled.Radius = config.Radius or self.defaultConfig.Radius
recycled.MinRadius = config.MinRadius or self.defaultConfig.MinRadius
if config.Spatialized ~= nil then
recycled.Spatialized = config.Spatialized
else
Expand All @@ -43,6 +45,7 @@ local mt = {
as.Position = config.Position or self.defaultConfig.Position
as.Volume = config.Volume or self.defaultConfig.Volume
as.Radius = config.Radius or self.defaultConfig.Radius
as.MinRadius = config.MinRadius or self.defaultConfig.MinRadius
if config.Spatialized ~= nil then
as.Spatialized = config.Spatialized
else
Expand Down

0 comments on commit d73f6f9

Please sign in to comment.