mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-30 03:09:20 +02:00
Version 2.4.1 - performance improvements, small bug fixes, graphs
This commit is contained in:
parent
82018bf3c9
commit
1729e7d635
BIN
data/images/loading.png
Normal file
BIN
data/images/loading.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -9,6 +9,7 @@ local render = nil
|
|||||||
local atlas = nil
|
local atlas = nil
|
||||||
local adaptiveRender = nil
|
local adaptiveRender = nil
|
||||||
local slowMain = nil
|
local slowMain = nil
|
||||||
|
local slowRender = nil
|
||||||
local widgetsInfo = nil
|
local widgetsInfo = nil
|
||||||
|
|
||||||
local updateEvent = nil
|
local updateEvent = nil
|
||||||
@ -37,6 +38,7 @@ function init()
|
|||||||
atlas = statsWindow:recursiveGetChildById('atlas')
|
atlas = statsWindow:recursiveGetChildById('atlas')
|
||||||
adaptiveRender = statsWindow:recursiveGetChildById('adaptiveRender')
|
adaptiveRender = statsWindow:recursiveGetChildById('adaptiveRender')
|
||||||
slowMain = statsWindow:recursiveGetChildById('slowMain')
|
slowMain = statsWindow:recursiveGetChildById('slowMain')
|
||||||
|
slowRender = statsWindow:recursiveGetChildById('slowRender')
|
||||||
widgetsInfo = statsWindow:recursiveGetChildById('widgetsInfo')
|
widgetsInfo = statsWindow:recursiveGetChildById('widgetsInfo')
|
||||||
|
|
||||||
lastSend = os.time()
|
lastSend = os.time()
|
||||||
@ -166,7 +168,7 @@ function sendStats()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function update()
|
function update()
|
||||||
updateEvent = scheduleEvent(update, 200)
|
updateEvent = scheduleEvent(update, 20)
|
||||||
if lastSend + sendInterval < os.time() then
|
if lastSend + sendInterval < os.time() then
|
||||||
sendStats()
|
sendStats()
|
||||||
end
|
end
|
||||||
@ -175,19 +177,29 @@ function update()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
iter = (iter + 1) % 8 -- some functions are slow (~5ms), it will avoid lags
|
||||||
|
if iter == 0 then
|
||||||
statsWindow.debugPanel.sleepTime:setText("GFPS: " .. g_app.getGraphicsFps() .. " PFPS: " .. g_app.getProcessingFps() .. " Packets: " .. g_game.getRecivedPacketsCount() .. " , " .. (g_game.getRecivedPacketsSize() / 1024) .. " KB")
|
statsWindow.debugPanel.sleepTime:setText("GFPS: " .. g_app.getGraphicsFps() .. " PFPS: " .. g_app.getProcessingFps() .. " Packets: " .. g_game.getRecivedPacketsCount() .. " , " .. (g_game.getRecivedPacketsSize() / 1024) .. " KB")
|
||||||
statsWindow.debugPanel.luaRamUsage:setText("Ram usage by lua: " .. gcinfo() .. " kb")
|
statsWindow.debugPanel.luaRamUsage:setText("Ram usage by lua: " .. gcinfo() .. " kb")
|
||||||
|
elseif iter == 1 then
|
||||||
local adaptive = "Adaptive: " .. g_adaptiveRenderer.getLevel() .. " | " .. g_adaptiveRenderer.getDebugInfo()
|
local adaptive = "Adaptive: " .. g_adaptiveRenderer.getLevel() .. " | " .. g_adaptiveRenderer.getDebugInfo()
|
||||||
adaptiveRender:setText(adaptive)
|
adaptiveRender:setText(adaptive)
|
||||||
atlas:setText("Atlas: " .. g_atlas.getStats())
|
atlas:setText("Atlas: " .. g_atlas.getStats())
|
||||||
|
elseif iter == 2 then
|
||||||
render:setText(g_stats.get(2, 10, true))
|
render:setText(g_stats.get(2, 10, true))
|
||||||
mainStats:setText(g_stats.get(1, 5, true))
|
mainStats:setText(g_stats.get(1, 5, true))
|
||||||
dispatcherStats:setText(g_stats.get(3, 5, true))
|
dispatcherStats:setText(g_stats.get(3, 5, true))
|
||||||
|
elseif iter == 3 then
|
||||||
luaStats:setText(g_stats.get(4, 5, true))
|
luaStats:setText(g_stats.get(4, 5, true))
|
||||||
luaCallback:setText(g_stats.get(5, 5, true))
|
luaCallback:setText(g_stats.get(5, 5, true))
|
||||||
|
elseif iter == 4 then
|
||||||
slowMain:setText(g_stats.getSlow(3, 10, 10, true) .. "\n\n\n" .. g_stats.getSlow(1, 20, 20, true))
|
slowMain:setText(g_stats.getSlow(3, 10, 10, true) .. "\n\n\n" .. g_stats.getSlow(1, 20, 20, true))
|
||||||
widgetsInfo:setText(g_stats.getWidgetsInfo(10, true))
|
elseif iter == 5 then
|
||||||
|
slowRender:setText(g_stats.getSlow(2, 10, 10, true))
|
||||||
|
elseif iter == 6 then
|
||||||
|
--disabled because takes a lot of cpu
|
||||||
|
--widgetsInfo:setText(g_stats.getWidgetsInfo(10, true))
|
||||||
|
elseif iter == 7 then
|
||||||
if g_proxy then
|
if g_proxy then
|
||||||
local text = ""
|
local text = ""
|
||||||
local proxiesDebug = g_proxy.getProxiesDebugInfo()
|
local proxiesDebug = g_proxy.getProxiesDebugInfo()
|
||||||
@ -196,5 +208,6 @@ function update()
|
|||||||
end
|
end
|
||||||
statsWindow.debugPanel.proxies:setText(text)
|
statsWindow.debugPanel.proxies:setText(text)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -24,12 +24,11 @@ MainWindow
|
|||||||
margin: 0 0 0 0
|
margin: 0 0 0 0
|
||||||
padding: 25 3 3 3
|
padding: 25 3 3 3
|
||||||
opacity: 0.9
|
opacity: 0.9
|
||||||
|
$mobile:
|
||||||
|
size: 550 300
|
||||||
@onEnter: modules.client_stats.toggle()
|
@onEnter: modules.client_stats.toggle()
|
||||||
@onEscape: modules.client_stats.toggle()
|
@onEscape: modules.client_stats.toggle()
|
||||||
|
|
||||||
$mobile:
|
|
||||||
size: 550 300
|
|
||||||
|
|
||||||
ScrollablePanel
|
ScrollablePanel
|
||||||
id: debugPanel
|
id: debugPanel
|
||||||
@ -103,7 +102,7 @@ MainWindow
|
|||||||
|
|
||||||
DebugText
|
DebugText
|
||||||
id: widgetsInfo
|
id: widgetsInfo
|
||||||
text: -
|
text: Disabled, edit stats.lua to enable
|
||||||
|
|
||||||
DebugLabel
|
DebugLabel
|
||||||
!text: tr('Slow main functions')
|
!text: tr('Slow main functions')
|
||||||
@ -112,6 +111,13 @@ MainWindow
|
|||||||
id: slowMain
|
id: slowMain
|
||||||
text: -
|
text: -
|
||||||
|
|
||||||
|
DebugLabel
|
||||||
|
!text: tr('Slow render functions')
|
||||||
|
|
||||||
|
DebugText
|
||||||
|
id: slowRender
|
||||||
|
text: -
|
||||||
|
|
||||||
VerticalScrollBar
|
VerticalScrollBar
|
||||||
id: debugScroll
|
id: debugScroll
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
@ -122,7 +122,7 @@ context.findPath = function(startPos, destPos, maxDist, params)
|
|||||||
marginMin
|
marginMin
|
||||||
marginMax
|
marginMax
|
||||||
]]--
|
]]--
|
||||||
if startPos.z ~= destPos.z then
|
if not destPos or startPos.z ~= destPos.z then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if type(maxDist) ~= 'number' then
|
if type(maxDist) ~= 'number' then
|
||||||
|
@ -134,6 +134,8 @@ MainWindow
|
|||||||
!text: tr('Shop')
|
!text: tr('Shop')
|
||||||
size: 750 500
|
size: 750 500
|
||||||
@onEscape: modules.game_shop.hide()
|
@onEscape: modules.game_shop.hide()
|
||||||
|
$mobile:
|
||||||
|
size: 500 360
|
||||||
|
|
||||||
Panel
|
Panel
|
||||||
id: infoPanel
|
id: infoPanel
|
||||||
|
@ -182,6 +182,8 @@ GameBotProtection = 99
|
|||||||
GameFasterAnimations = 101
|
GameFasterAnimations = 101
|
||||||
GameCenteredOutfits = 102
|
GameCenteredOutfits = 102
|
||||||
GameSendIdentifiers = 103
|
GameSendIdentifiers = 103
|
||||||
|
GameWingsAndAura = 104
|
||||||
|
GamePlayerStateU32 = 105
|
||||||
|
|
||||||
GamePacketSizeU32 = 110
|
GamePacketSizeU32 = 110
|
||||||
GamePacketCompression = 111
|
GamePacketCompression = 111
|
||||||
|
BIN
otclient_dx.exe
BIN
otclient_dx.exe
Binary file not shown.
BIN
otclient_gl.exe
BIN
otclient_gl.exe
Binary file not shown.
BIN
otclient_linux
BIN
otclient_linux
Binary file not shown.
BIN
otclientv8.apk
BIN
otclientv8.apk
Binary file not shown.
BIN
pdb/pdb.7z
BIN
pdb/pdb.7z
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user