Closed brandonsturgeon closed 6 months ago
Could you put ply
as the first arg so its consistent with Copy
Sure, but note that because the function is exposed it'll be a breaking change for anything that uses AreaCopy
directly
Yeah. Also you need to update the functions calling it.
D'oh, thanks. I did it very mindlessly
Can you fix them?
Problem Summary
The Copy function takes a
ply
so it can determine which entities to copy: https://github.com/wiremod/advdupe2/blob/master/lua/advdupe2/sv_clipboard.lua#L376But when the
CopyOutside
param is enabled inAreaCopy
, it doesn't pass aply
in: https://github.com/wiremod/advdupe2/blob/master/lua/advdupe2/sv_clipboard.lua#L495So when using the
CopyOutside
param withAreaCopy
, an error is produced:The Fix
I've updated the
AreaCopy
function to takeply
as the last parameter, which is then passed through to theCopy
function correctly.I also updated all of the instances of
AreaCopy
to provide aply
.I'm not 100% sure this is the best way, but it does address the issue.
Reproduce
master