Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
61 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--?? |
22 changes: 22 additions & 0 deletions
22
assets/mod_overrides/AddOnThrowablesSync/Hooks/SyncCheck.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FakeSyncFixList = FakeSyncFixList or {} | ||
FakeSyncFixInit = FakeSyncFixInit or {} | ||
|
||
Hooks:Add("NetworkReceivedData", "NetReceived_AddOnThrowablesSync", function(sender, sync_asked, data) | ||
_Net = _G and _G.LuaNetworking or nil | ||
if sync_asked and data and _Net then | ||
if sync_asked == "AddOnFragAsk" then | ||
data = tostring(data) | ||
sender = tonumber(sender) | ||
if sender >= 1 and tweak_data.blackmarket.projectiles[data] then | ||
_Net:SendToPeer(sender, "AddOnFragReply", data) | ||
end | ||
elseif sync_asked == "AddOnFragReply" then | ||
data = tostring(data) | ||
sender = tonumber(sender) | ||
if sender >= 1 then | ||
FakeSyncFixList[sender] = FakeSyncFixList[sender] or {} | ||
FakeSyncFixList[sender][data] = true | ||
end | ||
end | ||
end | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
assets/mod_overrides/AddOnThrowablesSync/Hooks/clientnetworksession.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters