Skip to content

Commit

Permalink
Complete adaptation for b41.66
Browse files Browse the repository at this point in the history
  • Loading branch information
outdead committed Feb 26, 2022
1 parent 14c02e0 commit be7b1ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.

## [Unreleased]
### Fixed
- Fixed logger for 41.66 build. `Connected` event in `_player.txt` file is still broken.
- Fixed logger for 41.66 build.

## [v0.7.1] - 2022-02-24
### Fixed
Expand Down
15 changes: 10 additions & 5 deletions src/lua/client/LogExtenderClient.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ LogExtenderClient = {

LogExtenderClient.writeLog = function(filemask, message)
--writeLog(filemask, message);
--ISLogSystem.sendLog(filemask, message)
--ISLogSystem.sendLog(LogExtenderClient.player, filemask, message)
sendClientCommand("LogExtender", "write", { mask = filemask, message = message });
end

Expand Down Expand Up @@ -499,11 +499,16 @@ LogExtenderClient.OnJoinToSafehouse = function()
end
end

-- OnCreatePlayerData adds callback for player OnCreatePlayerData event.
LogExtenderClient.OnCreatePlayerData = function(id)
local player = getSpecificPlayer(id)
-- OnCreatePlayer adds callback for player OnCreatePlayerData event.
LogExtenderClient.OnCreatePlayer = function(id)
Events.OnTick.Add(LogExtenderClient.OnTick);
end

LogExtenderClient.OnTick = function()
local player = getPlayer()
if player then
LogExtenderClient.DumpPlayer(player, "connected");
Events.OnTick.Remove(LogExtenderClient.OnTick);
end
end

Expand Down Expand Up @@ -628,7 +633,7 @@ LogExtenderClient.OnGameStart = function()
end

if SandboxVars.LogExtender.PlayerConnected then
Events.OnCreatePlayer.Add(LogExtenderClient.OnCreatePlayerData);
Events.OnCreatePlayer.Add(LogExtenderClient.OnCreatePlayer);
end

if SandboxVars.LogExtender.ReleaseSafeHouse then
Expand Down

0 comments on commit be7b1ca

Please sign in to comment.