mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-12 19:18:20 +00:00
commit
25bb82c3bd
|
@ -1900,6 +1900,10 @@ if(CLIENT)
|
||||||
)
|
)
|
||||||
target_link_libraries(${TARGET_CLIENT} ${LIBS_CLIENT})
|
target_link_libraries(${TARGET_CLIENT} ${LIBS_CLIENT})
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
target_link_options(${TARGET_CLIENT} PRIVATE /ENTRY:mainCRTStartup)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(${TARGET_CLIENT} PRIVATE
|
target_include_directories(${TARGET_CLIENT} PRIVATE
|
||||||
${CURL_INCLUDE_DIRS}
|
${CURL_INCLUDE_DIRS}
|
||||||
${FREETYPE_INCLUDE_DIRS}
|
${FREETYPE_INCLUDE_DIRS}
|
||||||
|
|
|
@ -1237,13 +1237,7 @@ Smooth Dynamic Camera
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1275,3 +1269,9 @@ Regular Background Color
|
||||||
|
|
||||||
DDNet %s is available:
|
DDNet %s is available:
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -943,13 +943,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1186,6 +1180,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1159,13 +1159,7 @@ Skin Database
|
||||||
Skins directory
|
Skins directory
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1237,6 +1231,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
https://wiki.ddnet.tw/
|
https://wiki.ddnet.tw/
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1262,15 +1262,6 @@ Use old chat style
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
== A largura da textura %s não é divisível por %d ou a altura não é divisível por %d, o que pode causar erros visuais.
|
== A largura da textura %s não é divisível por %d ou a altura não é divisível por %d, o que pode causar erros visuais.
|
||||||
|
|
||||||
45° aim
|
|
||||||
== Mirar em 45º
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
== Ativar deepfly
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
== Desativar deepfly
|
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
== Dummy
|
== Dummy
|
||||||
|
|
||||||
|
@ -1294,3 +1285,12 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
== Cor de fundo comum
|
== Cor de fundo comum
|
||||||
|
|
||||||
|
Chat command
|
||||||
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -943,13 +943,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1186,6 +1180,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1182,13 +1182,7 @@ Skin Database
|
||||||
Skins directory
|
Skins directory
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1248,6 +1242,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
https://wiki.ddnet.tw/
|
https://wiki.ddnet.tw/
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1250,13 +1250,7 @@ Update failed! Check log...
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1282,3 +1276,9 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1248,13 +1248,7 @@ Grabs
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1280,3 +1274,9 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1194,13 +1194,7 @@ Skin Database
|
||||||
Skins directory
|
Skins directory
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1260,6 +1254,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
https://wiki.ddnet.tw/
|
https://wiki.ddnet.tw/
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -944,13 +944,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1187,6 +1181,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1273,13 +1273,7 @@ Replay
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1305,3 +1299,9 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1262,15 +1262,6 @@ Smooth Dynamic Camera
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
== Die Breite von Textur %s ist nicht durch %d teilbar, oder die Höhe nicht durch %d teilbar, was Visuelle Fehler verursachen könnte.
|
== Die Breite von Textur %s ist nicht durch %d teilbar, oder die Höhe nicht durch %d teilbar, was Visuelle Fehler verursachen könnte.
|
||||||
|
|
||||||
45° aim
|
|
||||||
== 45°-Zielen
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
== Deepfly an
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
== Deepfly aus
|
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
== Dummy
|
== Dummy
|
||||||
|
|
||||||
|
@ -1294,3 +1285,12 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
== Normale Hintergrundfarbe
|
== Normale Hintergrundfarbe
|
||||||
|
|
||||||
|
Chat command
|
||||||
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1246,13 +1246,7 @@ Replay
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1279,5 +1273,11 @@ Entities Background color
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
https://wiki.ddnet.tw/
|
https://wiki.ddnet.tw/
|
||||||
==
|
==
|
||||||
|
|
|
@ -1278,13 +1278,7 @@ Markers:
|
||||||
Converse
|
Converse
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1314,5 +1308,11 @@ Entities Background color
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
FPM
|
FPM
|
||||||
==
|
==
|
||||||
|
|
|
@ -943,13 +943,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1186,6 +1180,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -942,13 +942,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1185,6 +1179,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -934,13 +934,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1177,6 +1171,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1249,13 +1249,7 @@ Play
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1281,3 +1275,9 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -763,13 +763,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1060,6 +1054,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1250,13 +1250,7 @@ Play
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1282,3 +1276,9 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1076,13 +1076,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1202,6 +1196,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -949,13 +949,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1192,6 +1186,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1253,15 +1253,6 @@ Entities
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
== Ширина текстуры %s не делится на %d или же его высота не делится на %d, что может повлиять на графику.
|
== Ширина текстуры %s не делится на %d или же его высота не делится на %d, что может повлиять на графику.
|
||||||
|
|
||||||
45° aim
|
|
||||||
== Прицел 45°
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
== Вкл. Deepfly
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
== Выкл. Deepfly
|
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
== Дамми
|
== Дамми
|
||||||
|
|
||||||
|
@ -1285,3 +1276,12 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
== Станд. фоновый цвет
|
== Станд. фоновый цвет
|
||||||
|
|
||||||
|
Chat command
|
||||||
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -947,13 +947,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1190,6 +1184,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
https://wiki.ddnet.tw/
|
https://wiki.ddnet.tw/
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1232,13 +1232,7 @@ Checking for existing player with your name
|
||||||
Smooth Dynamic Camera
|
Smooth Dynamic Camera
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1279,3 +1273,9 @@ Use current map as background
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1256,16 +1256,16 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
== 材质目录
|
== 材质目录
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
== http://chat.teeworlds.cn/
|
||||||
|
|
||||||
|
Discord
|
||||||
|
== 开黑啦
|
||||||
|
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
|
|
@ -943,13 +943,7 @@ Show entities
|
||||||
Show HUD
|
Show HUD
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
UI mouse s.
|
UI mouse s.
|
||||||
|
@ -1186,6 +1180,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
Learn
|
Learn
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1254,13 +1254,7 @@ Replay
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1286,3 +1280,9 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1220,13 +1220,7 @@ Skin Database
|
||||||
Skins directory
|
Skins directory
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1282,3 +1276,9 @@ Particles
|
||||||
|
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1253,13 +1253,7 @@ Assets directory
|
||||||
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
The width of texture %s is not divisible by %d, or the height is not divisible by %d, which might cause visual bugs.
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1285,3 +1279,9 @@ Entities Background color
|
||||||
|
|
||||||
Regular Background Color
|
Regular Background Color
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
|
@ -1197,13 +1197,7 @@ Skin Database
|
||||||
Skins directory
|
Skins directory
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1260,6 +1254,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
https://wiki.ddnet.tw/
|
https://wiki.ddnet.tw/
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -1192,13 +1192,7 @@ Skin Database
|
||||||
Skins directory
|
Skins directory
|
||||||
==
|
==
|
||||||
|
|
||||||
45° aim
|
Chat command
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly on
|
|
||||||
==
|
|
||||||
|
|
||||||
Deepfly off
|
|
||||||
==
|
==
|
||||||
|
|
||||||
Dummy
|
Dummy
|
||||||
|
@ -1255,6 +1249,12 @@ Particles
|
||||||
Assets directory
|
Assets directory
|
||||||
==
|
==
|
||||||
|
|
||||||
|
Discord
|
||||||
|
==
|
||||||
|
|
||||||
|
https://ddnet.tw/discord
|
||||||
|
==
|
||||||
|
|
||||||
https://wiki.ddnet.tw/
|
https://wiki.ddnet.tw/
|
||||||
==
|
==
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,10 @@ class Dmgtools(Dmg):
|
||||||
def _dmg(self, *args):
|
def _dmg(self, *args):
|
||||||
self._check_call((self.config.dmg,) + args)
|
self._check_call((self.config.dmg,) + args)
|
||||||
|
|
||||||
def _create_hfs(self, hfs, volume_name, size):
|
def _create_hfs(self, hfs_fd, hfs, volume_name, size):
|
||||||
if self.config.verbose >= 1:
|
if self.config.verbose >= 1:
|
||||||
print("TRUNCATING {} to {} bytes".format(hfs, size))
|
print("TRUNCATING {} to {} bytes".format(hfs, size))
|
||||||
with open(hfs, 'wb') as f:
|
with os.fdopen(hfs_fd, 'wb') as f:
|
||||||
f.truncate(size)
|
f.truncate(size)
|
||||||
self._mkfs_hfs('-v', volume_name, hfs)
|
self._mkfs_hfs('-v', volume_name, hfs)
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ class Dmgtools(Dmg):
|
||||||
def create(self, dmg, volume_name, directory, symlinks):
|
def create(self, dmg, volume_name, directory, symlinks):
|
||||||
input_size = sum(os.stat(os.path.join(path, f)).st_size for path, dirs, files in os.walk(directory) for f in files)
|
input_size = sum(os.stat(os.path.join(path, f)).st_size for path, dirs, files in os.walk(directory) for f in files)
|
||||||
output_size = max(input_size * 2, 1024**2)
|
output_size = max(input_size * 2, 1024**2)
|
||||||
hfs = tempfile.mkstemp(prefix=dmg + '.', suffix='.hfs')
|
hfs_fd, hfs = tempfile.mkstemp(prefix=dmg + '.', suffix='.hfs')
|
||||||
self._create_hfs(hfs, volume_name, output_size)
|
self._create_hfs(hfs_fd, hfs, volume_name, output_size)
|
||||||
self._add(hfs, directory)
|
self._add(hfs, directory)
|
||||||
for target, link_name in symlinks:
|
for target, link_name in symlinks:
|
||||||
self._symlink(hfs, target, link_name)
|
self._symlink(hfs, target, link_name)
|
||||||
|
|
|
@ -140,6 +140,7 @@ int CRequest::RunImpl(CURL *pHandle)
|
||||||
curl_easy_setopt(pHandle, CURLOPT_URL, m_aUrl);
|
curl_easy_setopt(pHandle, CURLOPT_URL, m_aUrl);
|
||||||
curl_easy_setopt(pHandle, CURLOPT_NOSIGNAL, 1L);
|
curl_easy_setopt(pHandle, CURLOPT_NOSIGNAL, 1L);
|
||||||
curl_easy_setopt(pHandle, CURLOPT_USERAGENT, GAME_NAME " " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")");
|
curl_easy_setopt(pHandle, CURLOPT_USERAGENT, GAME_NAME " " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")");
|
||||||
|
curl_easy_setopt(pHandle, CURLOPT_ACCEPT_ENCODING, ""); // Use any compression algorithm supported by libcurl.
|
||||||
|
|
||||||
curl_easy_setopt(pHandle, CURLOPT_WRITEDATA, this);
|
curl_easy_setopt(pHandle, CURLOPT_WRITEDATA, this);
|
||||||
curl_easy_setopt(pHandle, CURLOPT_WRITEFUNCTION, WriteCallback);
|
curl_easy_setopt(pHandle, CURLOPT_WRITEFUNCTION, WriteCallback);
|
||||||
|
|
|
@ -1855,6 +1855,9 @@ void CServer::CacheServerInfo(CCache *pCache, int Type, bool SendClients)
|
||||||
ADD_INT(p, g_Config.m_Password[0] ? SERVER_FLAG_PASSWORD : 0);
|
ADD_INT(p, g_Config.m_Password[0] ? SERVER_FLAG_PASSWORD : 0);
|
||||||
|
|
||||||
int MaxClients = m_NetServer.MaxClients();
|
int MaxClients = m_NetServer.MaxClients();
|
||||||
|
// How many clients the used serverinfo protocol supports, has to be tracked
|
||||||
|
// separately to make sure we don't subtract the reserved slots from it
|
||||||
|
int MaxClientsProtocol = MAX_CLIENTS;
|
||||||
if(Type == SERVERINFO_VANILLA || Type == SERVERINFO_INGAME)
|
if(Type == SERVERINFO_VANILLA || Type == SERVERINFO_INGAME)
|
||||||
{
|
{
|
||||||
if(ClientCount >= VANILLA_MAX_CLIENTS)
|
if(ClientCount >= VANILLA_MAX_CLIENTS)
|
||||||
|
@ -1864,16 +1867,15 @@ void CServer::CacheServerInfo(CCache *pCache, int Type, bool SendClients)
|
||||||
else
|
else
|
||||||
ClientCount = VANILLA_MAX_CLIENTS;
|
ClientCount = VANILLA_MAX_CLIENTS;
|
||||||
}
|
}
|
||||||
if(MaxClients > VANILLA_MAX_CLIENTS)
|
MaxClientsProtocol = VANILLA_MAX_CLIENTS;
|
||||||
MaxClients = VANILLA_MAX_CLIENTS;
|
|
||||||
if(PlayerCount > ClientCount)
|
if(PlayerCount > ClientCount)
|
||||||
PlayerCount = ClientCount;
|
PlayerCount = ClientCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
ADD_INT(p, PlayerCount); // num players
|
ADD_INT(p, PlayerCount); // num players
|
||||||
ADD_INT(p, maximum(MaxClients - maximum(g_Config.m_SvSpectatorSlots, g_Config.m_SvReservedSlots), PlayerCount)); // max players
|
ADD_INT(p, minimum(MaxClientsProtocol, maximum(MaxClients - maximum(g_Config.m_SvSpectatorSlots, g_Config.m_SvReservedSlots), PlayerCount))); // max players
|
||||||
ADD_INT(p, ClientCount); // num clients
|
ADD_INT(p, ClientCount); // num clients
|
||||||
ADD_INT(p, maximum(MaxClients - g_Config.m_SvReservedSlots, ClientCount)); // max clients
|
ADD_INT(p, minimum(MaxClientsProtocol, maximum(MaxClients - g_Config.m_SvReservedSlots, ClientCount))); // max clients
|
||||||
|
|
||||||
if(Type == SERVERINFO_EXTENDED)
|
if(Type == SERVERINFO_EXTENDED)
|
||||||
p.AddString("", 0); // extra info, reserved
|
p.AddString("", 0); // extra info, reserved
|
||||||
|
|
|
@ -529,7 +529,7 @@ void CDemoPlayer::ScanFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy all the frames to an array instead for fast access
|
// copy all the frames to an array instead for fast access
|
||||||
m_pKeyFrames = (CKeyFrame *)calloc(std::max(m_Info.m_SeekablePoints, 1), sizeof(CKeyFrame));
|
m_pKeyFrames = (CKeyFrame *)calloc(maximum(m_Info.m_SeekablePoints, 1), sizeof(CKeyFrame));
|
||||||
for(pCurrentKey = pFirstKey, i = 0; pCurrentKey; pCurrentKey = pCurrentKey->m_pNext, i++)
|
for(pCurrentKey = pFirstKey, i = 0; pCurrentKey; pCurrentKey = pCurrentKey->m_pNext, i++)
|
||||||
m_pKeyFrames[i] = pCurrentKey->m_Frame;
|
m_pKeyFrames[i] = pCurrentKey->m_Frame;
|
||||||
|
|
||||||
|
|
|
@ -469,8 +469,6 @@ void CBinds::SetDDRaceBinds(bool FreeOnly)
|
||||||
Bind(KEY_S, "+showhookcoll", FreeOnly);
|
Bind(KEY_S, "+showhookcoll", FreeOnly);
|
||||||
Bind(KEY_X, "toggle cl_dummy 0 1", FreeOnly);
|
Bind(KEY_X, "toggle cl_dummy 0 1", FreeOnly);
|
||||||
Bind(KEY_H, "toggle cl_dummy_hammer 0 1", FreeOnly);
|
Bind(KEY_H, "toggle cl_dummy_hammer 0 1", FreeOnly);
|
||||||
Bind(KEY_UP, "bind mouse1 \"+fire; +toggle cl_dummy_hammer 1 0\"", FreeOnly);
|
|
||||||
Bind(KEY_DOWN, "bind mouse1 \"+fire\"", FreeOnly);
|
|
||||||
Bind(KEY_SLASH, "+show_chat; chat all /", FreeOnly);
|
Bind(KEY_SLASH, "+show_chat; chat all /", FreeOnly);
|
||||||
Bind(KEY_PAGEDOWN, "toggle cl_show_quads 0 1", FreeOnly);
|
Bind(KEY_PAGEDOWN, "toggle cl_show_quads 0 1", FreeOnly);
|
||||||
Bind(KEY_PAGEUP, "toggle cl_overlay_entities 0 100", FreeOnly);
|
Bind(KEY_PAGEUP, "toggle cl_overlay_entities 0 100", FreeOnly);
|
||||||
|
|
|
@ -760,7 +760,6 @@ static CKeyInfo gs_aKeys[] =
|
||||||
{"Fire", "+fire", 0, 0},
|
{"Fire", "+fire", 0, 0},
|
||||||
{"Hook", "+hook", 0, 0},
|
{"Hook", "+hook", 0, 0},
|
||||||
{"Hook collisions", "+showhookcoll", 0, 0},
|
{"Hook collisions", "+showhookcoll", 0, 0},
|
||||||
{"45° aim", "+toggle cl_mouse_max_distance 2 400; +toggle inp_mousesens 1 200", 0, 0},
|
|
||||||
{"Pause", "say /pause", 0, 0},
|
{"Pause", "say /pause", 0, 0},
|
||||||
{"Kill", "kill", 0, 0},
|
{"Kill", "kill", 0, 0},
|
||||||
{"Zoom in", "zoom+", 0, 0},
|
{"Zoom in", "zoom+", 0, 0},
|
||||||
|
@ -791,8 +790,6 @@ static CKeyInfo gs_aKeys[] =
|
||||||
{"Toggle dummy", "toggle cl_dummy 0 1", 0, 0},
|
{"Toggle dummy", "toggle cl_dummy 0 1", 0, 0},
|
||||||
{"Dummy copy", "toggle cl_dummy_copy_moves 0 1", 0, 0},
|
{"Dummy copy", "toggle cl_dummy_copy_moves 0 1", 0, 0},
|
||||||
{"Hammerfly dummy", "toggle cl_dummy_hammer 0 1", 0, 0},
|
{"Hammerfly dummy", "toggle cl_dummy_hammer 0 1", 0, 0},
|
||||||
{"Deepfly on", "bind mouse1 \"+fire; +toggle cl_dummy_hammer 1 0\"", 0, 0},
|
|
||||||
{"Deepfly off", "bind mouse1 \"+fire\"", 0, 0},
|
|
||||||
|
|
||||||
{"Emoticon", "+emote", 0, 0},
|
{"Emoticon", "+emote", 0, 0},
|
||||||
{"Spectator mode", "+spectate", 0, 0},
|
{"Spectator mode", "+spectate", 0, 0},
|
||||||
|
@ -818,8 +815,7 @@ static CKeyInfo gs_aKeys[] =
|
||||||
Localize("Chat");Localize("Team chat");Localize("Converse");Localize("Show chat");Localize("Emoticon");
|
Localize("Chat");Localize("Team chat");Localize("Converse");Localize("Show chat");Localize("Emoticon");
|
||||||
Localize("Spectator mode");Localize("Spectate next");Localize("Spectate previous");Localize("Console");
|
Localize("Spectator mode");Localize("Spectate next");Localize("Spectate previous");Localize("Console");
|
||||||
Localize("Remote console");Localize("Screenshot");Localize("Scoreboard");Localize("Statboard");
|
Localize("Remote console");Localize("Screenshot");Localize("Scoreboard");Localize("Statboard");
|
||||||
Localize("Lock team");Localize("Show entities");Localize("Show HUD");Localize("45° aim");
|
Localize("Lock team");Localize("Show entities");Localize("Show HUD");Localize("Chat command");
|
||||||
Localize("Chat command";Localize("Deepfly on");Localize("Deepfly off");
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void CMenus::UiDoGetButtons(int Start, int Stop, CUIRect View, CUIRect ScopeView)
|
void CMenus::UiDoGetButtons(int Start, int Stop, CUIRect View, CUIRect ScopeView)
|
||||||
|
@ -893,7 +889,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
// movement settings
|
// movement settings
|
||||||
{
|
{
|
||||||
MovementSettings.VMargin(5.0f, &MovementSettings);
|
MovementSettings.VMargin(5.0f, &MovementSettings);
|
||||||
MovementSettings.HSplitTop(510.0f, &MovementSettings, &WeaponSettings);
|
MovementSettings.HSplitTop(490.0f, &MovementSettings, &WeaponSettings);
|
||||||
RenderTools()->DrawUIRect(&MovementSettings, ColorRGBA(1, 1, 1, 0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&MovementSettings, ColorRGBA(1, 1, 1, 0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
MovementSettings.VMargin(10.0f, &MovementSettings);
|
MovementSettings.VMargin(10.0f, &MovementSettings);
|
||||||
|
|
||||||
|
@ -927,7 +923,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
MovementSettings.HSplitTop(20.0f, 0, &MovementSettings);
|
MovementSettings.HSplitTop(20.0f, 0, &MovementSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
UiDoGetButtons(0, 18, MovementSettings, MainView);
|
UiDoGetButtons(0, 17, MovementSettings, MainView);
|
||||||
}
|
}
|
||||||
|
|
||||||
// weapon settings
|
// weapon settings
|
||||||
|
@ -940,7 +936,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
TextRender()->Text(0, WeaponSettings.x, WeaponSettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Weapon"), -1.0f);
|
TextRender()->Text(0, WeaponSettings.x, WeaponSettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Weapon"), -1.0f);
|
||||||
|
|
||||||
WeaponSettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &WeaponSettings);
|
WeaponSettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &WeaponSettings);
|
||||||
UiDoGetButtons(18, 23, WeaponSettings, MainView);
|
UiDoGetButtons(17, 22, WeaponSettings, MainView);
|
||||||
}
|
}
|
||||||
|
|
||||||
// defaults
|
// defaults
|
||||||
|
@ -966,7 +962,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
TextRender()->Text(0, VotingSettings.x, VotingSettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Voting"), -1.0f);
|
TextRender()->Text(0, VotingSettings.x, VotingSettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Voting"), -1.0f);
|
||||||
|
|
||||||
VotingSettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &VotingSettings);
|
VotingSettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &VotingSettings);
|
||||||
UiDoGetButtons(23, 25, VotingSettings, MainView);
|
UiDoGetButtons(22, 24, VotingSettings, MainView);
|
||||||
}
|
}
|
||||||
|
|
||||||
// chat settings
|
// chat settings
|
||||||
|
@ -979,20 +975,20 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
TextRender()->Text(0, ChatSettings.x, ChatSettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Chat"), -1.0f);
|
TextRender()->Text(0, ChatSettings.x, ChatSettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Chat"), -1.0f);
|
||||||
|
|
||||||
ChatSettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &ChatSettings);
|
ChatSettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &ChatSettings);
|
||||||
UiDoGetButtons(25, 30, ChatSettings, MainView);
|
UiDoGetButtons(24, 29, ChatSettings, MainView);
|
||||||
}
|
}
|
||||||
|
|
||||||
// dummy settings
|
// dummy settings
|
||||||
{
|
{
|
||||||
DummySettings.HSplitTop(10.0f, 0, &DummySettings);
|
DummySettings.HSplitTop(10.0f, 0, &DummySettings);
|
||||||
DummySettings.HSplitTop(145.0f, &DummySettings, &MiscSettings);
|
DummySettings.HSplitTop(100.0f, &DummySettings, &MiscSettings);
|
||||||
RenderTools()->DrawUIRect(&DummySettings, ColorRGBA(1, 1, 1, 0.25f), CUI::CORNER_ALL, 10.0f);
|
RenderTools()->DrawUIRect(&DummySettings, ColorRGBA(1, 1, 1, 0.25f), CUI::CORNER_ALL, 10.0f);
|
||||||
DummySettings.VMargin(10.0f, &DummySettings);
|
DummySettings.VMargin(10.0f, &DummySettings);
|
||||||
|
|
||||||
TextRender()->Text(0, DummySettings.x, DummySettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Dummy"), -1.0f);
|
TextRender()->Text(0, DummySettings.x, DummySettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Dummy"), -1.0f);
|
||||||
|
|
||||||
DummySettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &DummySettings);
|
DummySettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &DummySettings);
|
||||||
UiDoGetButtons(30, 35, DummySettings, MainView);
|
UiDoGetButtons(29, 32, DummySettings, MainView);
|
||||||
}
|
}
|
||||||
|
|
||||||
// misc settings
|
// misc settings
|
||||||
|
@ -1005,7 +1001,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
||||||
TextRender()->Text(0, MiscSettings.x, MiscSettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Miscellaneous"), -1.0f);
|
TextRender()->Text(0, MiscSettings.x, MiscSettings.y + (14.0f + 5.0f + 10.0f - 14.0f * UI()->Scale()) / 2.f, 14.0f * UI()->Scale(), Localize("Miscellaneous"), -1.0f);
|
||||||
|
|
||||||
MiscSettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &MiscSettings);
|
MiscSettings.HSplitTop(14.0f + 5.0f + 10.0f, 0, &MiscSettings);
|
||||||
UiDoGetButtons(35, 47, MiscSettings, MainView);
|
UiDoGetButtons(32, 44, MiscSettings, MainView);
|
||||||
}
|
}
|
||||||
|
|
||||||
UiDoListboxEnd(&s_ScrollValue, 0);
|
UiDoListboxEnd(&s_ScrollValue, 0);
|
||||||
|
|
|
@ -37,9 +37,9 @@ void CMenus::RenderStartMenu(CUIRect MainView)
|
||||||
|
|
||||||
ExtMenu.HSplitBottom(20.0f, &ExtMenu, &Button);
|
ExtMenu.HSplitBottom(20.0f, &ExtMenu, &Button);
|
||||||
static int s_DiscordButton;
|
static int s_DiscordButton;
|
||||||
if(DoButton_Menu(&s_DiscordButton, "Discord", 0, &Button, 0, CUI::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)))
|
if(DoButton_Menu(&s_DiscordButton, Localize("Discord"), 0, &Button, 0, CUI::CORNER_ALL, 5.0f, 0.0f, vec4(0.0f, 0.0f, 0.0f, 0.5f), vec4(0.0f, 0.0f, 0.0f, 0.25f)))
|
||||||
{
|
{
|
||||||
if(!open_link("https://ddnet.tw/discord"))
|
if(!open_link(Localize("https://ddnet.tw/discord")))
|
||||||
{
|
{
|
||||||
dbg_msg("menus", "couldn't open link");
|
dbg_msg("menus", "couldn't open link");
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@ CHAT_COMMAND("teamrank", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTe
|
||||||
CHAT_COMMAND("rank", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConRank, this, "Shows the rank of player with name r (your rank by default)")
|
CHAT_COMMAND("rank", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConRank, this, "Shows the rank of player with name r (your rank by default)")
|
||||||
CHAT_COMMAND("top5team", "?s[player name] ?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder or of a player beginning with rank i (1 by default, -1 for worst)")
|
CHAT_COMMAND("top5team", "?s[player name] ?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder or of a player beginning with rank i (1 by default, -1 for worst)")
|
||||||
CHAT_COMMAND("teamtop5", "?s[player name] ?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder or of a player beginning with rank i (1 by default, -1 for worst)")
|
CHAT_COMMAND("teamtop5", "?s[player name] ?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder or of a player beginning with rank i (1 by default, -1 for worst)")
|
||||||
CHAT_COMMAND("top5", "?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTop5, this, "Shows five ranks of the ladder beginning with rank i (1 by default, -1 for worst)")
|
CHAT_COMMAND("top", "?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTop, this, "Shows five ranks of the global and regional ladder beginning with rank i (1 by default, -1 for worst)")
|
||||||
|
CHAT_COMMAND("top5", "?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTop, this, "Shows five ranks of the global and regional ladder beginning with rank i (1 by default, -1 for worst)")
|
||||||
CHAT_COMMAND("times", "?s[player name] ?i[number of times to skip]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTimes, this, "/times ?s?i shows last 5 times of the server or of a player beginning with name s starting with time i (i = 1 by default, -1 for first)")
|
CHAT_COMMAND("times", "?s[player name] ?i[number of times to skip]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTimes, this, "/times ?s?i shows last 5 times of the server or of a player beginning with name s starting with time i (i = 1 by default, -1 for first)")
|
||||||
CHAT_COMMAND("points", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConPoints, this, "Shows the global points of a player beginning with name r (your rank by default)")
|
CHAT_COMMAND("points", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConPoints, this, "Shows the global points of a player beginning with name r (your rank by default)")
|
||||||
CHAT_COMMAND("top5points", "?i[number]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTopPoints, this, "Shows five points of the global point ladder beginning with rank i (1 by default)")
|
CHAT_COMMAND("top5points", "?i[number]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTopPoints, this, "Shows five points of the global point ladder beginning with rank i (1 by default)")
|
||||||
|
|
|
@ -270,7 +270,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName)
|
||||||
Size += str_length(m_lSettings[i].m_aCommand) + 1;
|
Size += str_length(m_lSettings[i].m_aCommand) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *pSettings = (char *)malloc(std::max(Size, 1));
|
char *pSettings = (char *)malloc(maximum(Size, 1));
|
||||||
char *pNext = pSettings;
|
char *pNext = pSettings;
|
||||||
for(int i = 0; i < m_lSettings.size(); i++)
|
for(int i = 0; i < m_lSettings.size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -536,7 +536,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName)
|
||||||
|
|
||||||
// save points
|
// save points
|
||||||
int TotalSize = sizeof(CEnvPoint) * PointCount;
|
int TotalSize = sizeof(CEnvPoint) * PointCount;
|
||||||
CEnvPoint *pPoints = (CEnvPoint *)calloc(std::max(PointCount, 1), sizeof(*pPoints));
|
CEnvPoint *pPoints = (CEnvPoint *)calloc(maximum(PointCount, 1), sizeof(*pPoints));
|
||||||
PointCount = 0;
|
PointCount = 0;
|
||||||
|
|
||||||
for(int e = 0; e < m_lEnvelopes.size(); e++)
|
for(int e = 0; e < m_lEnvelopes.size(); e++)
|
||||||
|
|
|
@ -423,7 +423,7 @@ void CGameContext::ConTeamTop5(IConsole::IResult *pResult, void *pUserData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameContext::ConTop5(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConTop(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CGameContext *pSelf = (CGameContext *)pUserData;
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
if(!CheckClientID(pResult->m_ClientID))
|
if(!CheckClientID(pResult->m_ClientID))
|
||||||
|
@ -431,15 +431,15 @@ void CGameContext::ConTop5(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
|
||||||
if(g_Config.m_SvHideScore)
|
if(g_Config.m_SvHideScore)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "top5",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "top",
|
||||||
"Showing the top 5 is not allowed on this server.");
|
"Showing the top is not allowed on this server.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pResult->NumArguments() > 0)
|
if(pResult->NumArguments() > 0)
|
||||||
pSelf->Score()->ShowTop5(pResult->m_ClientID, pResult->GetInteger(0));
|
pSelf->Score()->ShowTop(pResult->m_ClientID, pResult->GetInteger(0));
|
||||||
else
|
else
|
||||||
pSelf->Score()->ShowTop5(pResult->m_ClientID);
|
pSelf->Score()->ShowTop(pResult->m_ClientID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameContext::ConTimes(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConTimes(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
|
|
@ -346,7 +346,7 @@ private:
|
||||||
static void ConToggleSpecVoted(IConsole::IResult *pResult, void *pUserData);
|
static void ConToggleSpecVoted(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConForcePause(IConsole::IResult *pResult, void *pUserData);
|
static void ConForcePause(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConTeamTop5(IConsole::IResult *pResult, void *pUserData);
|
static void ConTeamTop5(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConTop5(IConsole::IResult *pResult, void *pUserData);
|
static void ConTop(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConTimes(IConsole::IResult *pResult, void *pUserData);
|
static void ConTimes(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConPoints(IConsole::IResult *pResult, void *pUserData);
|
static void ConPoints(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConTopPoints(IConsole::IResult *pResult, void *pUserData);
|
static void ConTopPoints(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
|
|
@ -933,13 +933,18 @@ void CPlayer::ProcessScoreResult(CScorePlayerResult &Result)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CScorePlayerResult::ALL:
|
case CScorePlayerResult::ALL:
|
||||||
|
{
|
||||||
|
int MessageClientId = m_ClientID;
|
||||||
for(auto &aMessage : Result.m_Data.m_aaMessages)
|
for(auto &aMessage : Result.m_Data.m_aaMessages)
|
||||||
{
|
{
|
||||||
if(aMessage[0] == 0)
|
if(aMessage[0] == 0)
|
||||||
break;
|
break;
|
||||||
GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aMessage, m_ClientID);
|
|
||||||
|
GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aMessage, MessageClientId);
|
||||||
|
MessageClientId = -1; // Prevent multi-messages being flagged as spam.
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case CScorePlayerResult::BROADCAST:
|
case CScorePlayerResult::BROADCAST:
|
||||||
if(Result.m_Data.m_Broadcast[0] != 0)
|
if(Result.m_Data.m_Broadcast[0] != 0)
|
||||||
GameServer()->SendBroadcast(Result.m_Data.m_Broadcast, -1);
|
GameServer()->SendBroadcast(Result.m_Data.m_Broadcast, -1);
|
||||||
|
|
|
@ -126,6 +126,7 @@ void CScore::ExecPlayerThread(
|
||||||
auto Tmp = std::unique_ptr<CSqlPlayerRequest>(new CSqlPlayerRequest(pResult));
|
auto Tmp = std::unique_ptr<CSqlPlayerRequest>(new CSqlPlayerRequest(pResult));
|
||||||
str_copy(Tmp->m_Name, pName, sizeof(Tmp->m_Name));
|
str_copy(Tmp->m_Name, pName, sizeof(Tmp->m_Name));
|
||||||
str_copy(Tmp->m_Map, g_Config.m_SvMap, sizeof(Tmp->m_Map));
|
str_copy(Tmp->m_Map, g_Config.m_SvMap, sizeof(Tmp->m_Map));
|
||||||
|
str_copy(Tmp->m_Server, g_Config.m_SvSqlServerName, sizeof(Tmp->m_Server));
|
||||||
str_copy(Tmp->m_RequestingPlayer, Server()->ClientName(ClientID), sizeof(Tmp->m_RequestingPlayer));
|
str_copy(Tmp->m_RequestingPlayer, Server()->ClientName(ClientID), sizeof(Tmp->m_RequestingPlayer));
|
||||||
Tmp->m_Offset = Offset;
|
Tmp->m_Offset = Offset;
|
||||||
|
|
||||||
|
@ -766,32 +767,63 @@ bool CScore::ShowRankThread(IDbConnection *pSqlServer, const ISqlData *pGameData
|
||||||
const CSqlPlayerRequest *pData = dynamic_cast<const CSqlPlayerRequest *>(pGameData);
|
const CSqlPlayerRequest *pData = dynamic_cast<const CSqlPlayerRequest *>(pGameData);
|
||||||
CScorePlayerResult *pResult = dynamic_cast<CScorePlayerResult *>(pGameData->m_pResult.get());
|
CScorePlayerResult *pResult = dynamic_cast<CScorePlayerResult *>(pGameData->m_pResult.get());
|
||||||
|
|
||||||
|
char aServerLike[16];
|
||||||
|
str_format(aServerLike, sizeof(aServerLike), "%%%s%%", pData->m_Server);
|
||||||
|
|
||||||
// check sort method
|
// check sort method
|
||||||
char aBuf[600];
|
char aBuf[600];
|
||||||
|
|
||||||
str_format(aBuf, sizeof(aBuf),
|
str_format(aBuf, sizeof(aBuf),
|
||||||
"SELECT Rank, Time, PercentRank "
|
"SELECT Rank, Time, PercentRank "
|
||||||
"FROM ("
|
"FROM ("
|
||||||
" SELECT RANK() OVER w AS Rank, PERCENT_RANK() OVER w as PercentRank, Name, MIN(Time) AS Time "
|
" SELECT RANK() OVER w AS Rank, PERCENT_RANK() OVER w as PercentRank, Name, MIN(Time) AS Time "
|
||||||
" FROM %s_race "
|
" FROM %s_race "
|
||||||
" WHERE Map = ? "
|
" WHERE Map = ? "
|
||||||
|
" AND Server LIKE ?"
|
||||||
" GROUP BY Name "
|
" GROUP BY Name "
|
||||||
" WINDOW w AS (ORDER BY Time)"
|
" WINDOW w AS (ORDER BY Time)"
|
||||||
") as a "
|
") as a "
|
||||||
"WHERE Name = ?;",
|
"WHERE Name = ?;",
|
||||||
pSqlServer->GetPrefix());
|
pSqlServer->GetPrefix());
|
||||||
|
|
||||||
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
pSqlServer->BindString(1, pData->m_Map);
|
pSqlServer->BindString(1, pData->m_Map);
|
||||||
pSqlServer->BindString(2, pData->m_Name);
|
pSqlServer->BindString(2, aServerLike);
|
||||||
|
pSqlServer->BindString(3, pData->m_Name);
|
||||||
|
|
||||||
bool End;
|
bool End;
|
||||||
if(pSqlServer->Step(&End, pError, ErrorSize))
|
if(pSqlServer->Step(&End, pError, ErrorSize))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char aRegionalRank[16];
|
||||||
|
if(End)
|
||||||
|
{
|
||||||
|
str_copy(aRegionalRank, "unranked", sizeof(aRegionalRank));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str_format(aRegionalRank, sizeof(aRegionalRank), "rank %d", pSqlServer->GetInt(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *pAny = "%";
|
||||||
|
|
||||||
|
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
pSqlServer->BindString(1, pData->m_Map);
|
||||||
|
pSqlServer->BindString(2, pAny);
|
||||||
|
pSqlServer->BindString(3, pData->m_Name);
|
||||||
|
|
||||||
|
if(pSqlServer->Step(&End, pError, ErrorSize))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!End)
|
if(!End)
|
||||||
{
|
{
|
||||||
int Rank = pSqlServer->GetInt(1);
|
int Rank = pSqlServer->GetInt(1);
|
||||||
|
@ -807,9 +839,23 @@ bool CScore::ShowRankThread(IDbConnection *pSqlServer, const ISqlData *pGameData
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pResult->m_MessageKind = CScorePlayerResult::ALL;
|
pResult->m_MessageKind = CScorePlayerResult::ALL;
|
||||||
str_format(pResult->m_Data.m_aaMessages[0], sizeof(pResult->m_Data.m_aaMessages[0]),
|
|
||||||
"%d. %s Time: %s, better than %d%%, requested by %s",
|
if(str_comp_nocase(pData->m_RequestingPlayer, pData->m_Name) == 0)
|
||||||
Rank, pData->m_Name, aBuf, BetterThanPercent, pData->m_RequestingPlayer);
|
{
|
||||||
|
str_format(pResult->m_Data.m_aaMessages[0], sizeof(pResult->m_Data.m_aaMessages[0]),
|
||||||
|
"%s Time: %s, better than %d%%",
|
||||||
|
pData->m_Name, aBuf, BetterThanPercent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str_format(pResult->m_Data.m_aaMessages[0], sizeof(pResult->m_Data.m_aaMessages[0]),
|
||||||
|
"%s Time: %s, better than %d%%, requested by %s",
|
||||||
|
pData->m_Name, aBuf, BetterThanPercent, pData->m_RequestingPlayer);
|
||||||
|
}
|
||||||
|
|
||||||
|
str_format(pResult->m_Data.m_aaMessages[1], sizeof(pResult->m_Data.m_aaMessages[1]),
|
||||||
|
"Global rank %d || %s %s",
|
||||||
|
Rank, pData->m_Server, aRegionalRank);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -910,20 +956,21 @@ bool CScore::ShowTeamRankThread(IDbConnection *pSqlServer, const ISqlData *pGame
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScore::ShowTop5(int ClientID, int Offset)
|
void CScore::ShowTop(int ClientID, int Offset)
|
||||||
{
|
{
|
||||||
if(RateLimitPlayer(ClientID))
|
if(RateLimitPlayer(ClientID))
|
||||||
return;
|
return;
|
||||||
ExecPlayerThread(ShowTop5Thread, "show top5", ClientID, "", Offset);
|
ExecPlayerThread(ShowTopThread, "show top5", ClientID, "", Offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CScore::ShowTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize)
|
bool CScore::ShowTopThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize)
|
||||||
{
|
{
|
||||||
const CSqlPlayerRequest *pData = dynamic_cast<const CSqlPlayerRequest *>(pGameData);
|
const CSqlPlayerRequest *pData = dynamic_cast<const CSqlPlayerRequest *>(pGameData);
|
||||||
CScorePlayerResult *pResult = dynamic_cast<CScorePlayerResult *>(pGameData->m_pResult.get());
|
CScorePlayerResult *pResult = dynamic_cast<CScorePlayerResult *>(pGameData->m_pResult.get());
|
||||||
|
|
||||||
int LimitStart = maximum(abs(pData->m_Offset) - 1, 0);
|
int LimitStart = maximum(abs(pData->m_Offset) - 1, 0);
|
||||||
const char *pOrder = pData->m_Offset >= 0 ? "ASC" : "DESC";
|
const char *pOrder = pData->m_Offset >= 0 ? "ASC" : "DESC";
|
||||||
|
const char *pAny = "%";
|
||||||
|
|
||||||
// check sort method
|
// check sort method
|
||||||
char aBuf[512];
|
char aBuf[512];
|
||||||
|
@ -933,23 +980,27 @@ bool CScore::ShowTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData
|
||||||
" SELECT RANK() OVER w AS Rank, Name, MIN(Time) AS Time "
|
" SELECT RANK() OVER w AS Rank, Name, MIN(Time) AS Time "
|
||||||
" FROM %s_race "
|
" FROM %s_race "
|
||||||
" WHERE Map = ? "
|
" WHERE Map = ? "
|
||||||
|
" AND Server LIKE ? "
|
||||||
" GROUP BY Name "
|
" GROUP BY Name "
|
||||||
" WINDOW w AS (ORDER BY Time)"
|
" WINDOW w AS (ORDER BY Time)"
|
||||||
") as a "
|
") as a "
|
||||||
"ORDER BY Rank %s "
|
"ORDER BY Rank %s "
|
||||||
"LIMIT %d, 5;",
|
"LIMIT %d, 3;",
|
||||||
pSqlServer->GetPrefix(),
|
pSqlServer->GetPrefix(),
|
||||||
pOrder,
|
pOrder,
|
||||||
LimitStart);
|
LimitStart);
|
||||||
|
|
||||||
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
pSqlServer->BindString(1, pData->m_Map);
|
pSqlServer->BindString(1, pData->m_Map);
|
||||||
|
pSqlServer->BindString(2, pAny);
|
||||||
|
|
||||||
// show top5
|
// show top
|
||||||
str_copy(pResult->m_Data.m_aaMessages[0], "----------- Top 5 -----------", sizeof(pResult->m_Data.m_aaMessages[0]));
|
str_copy(pResult->m_Data.m_aaMessages[0], "-----------< Global Top 3 >-----------", sizeof(pResult->m_Data.m_aaMessages[0]));
|
||||||
|
|
||||||
|
char aTime[32];
|
||||||
int Line = 1;
|
int Line = 1;
|
||||||
bool End = false;
|
bool End = false;
|
||||||
while(!pSqlServer->Step(&End, pError, ErrorSize) && !End)
|
while(!pSqlServer->Step(&End, pError, ErrorSize) && !End)
|
||||||
|
@ -957,17 +1008,43 @@ bool CScore::ShowTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData
|
||||||
char aName[MAX_NAME_LENGTH];
|
char aName[MAX_NAME_LENGTH];
|
||||||
pSqlServer->GetString(1, aName, sizeof(aName));
|
pSqlServer->GetString(1, aName, sizeof(aName));
|
||||||
float Time = pSqlServer->GetFloat(2);
|
float Time = pSqlServer->GetFloat(2);
|
||||||
str_time_float(Time, TIME_HOURS_CENTISECS, aBuf, sizeof(aBuf));
|
str_time_float(Time, TIME_HOURS_CENTISECS, aTime, sizeof(aTime));
|
||||||
int Rank = pSqlServer->GetInt(3);
|
int Rank = pSqlServer->GetInt(3);
|
||||||
str_format(pResult->m_Data.m_aaMessages[Line], sizeof(pResult->m_Data.m_aaMessages[Line]),
|
str_format(pResult->m_Data.m_aaMessages[Line], sizeof(pResult->m_Data.m_aaMessages[Line]),
|
||||||
"%d. %s Time: %s", Rank, aName, aBuf);
|
"%d. %s Time: %s", Rank, aName, aTime);
|
||||||
|
Line++;
|
||||||
|
}
|
||||||
|
|
||||||
|
char aServerLike[16];
|
||||||
|
str_format(aServerLike, sizeof(aServerLike), "%%%s%%", pData->m_Server);
|
||||||
|
|
||||||
|
if(pSqlServer->PrepareStatement(aBuf, pError, ErrorSize))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
pSqlServer->BindString(1, pData->m_Map);
|
||||||
|
pSqlServer->BindString(2, aServerLike);
|
||||||
|
|
||||||
|
str_format(pResult->m_Data.m_aaMessages[Line], sizeof(pResult->m_Data.m_aaMessages[Line]),
|
||||||
|
"-----------< %s Top 3 >-----------", pData->m_Server);
|
||||||
|
Line++;
|
||||||
|
|
||||||
|
// show top
|
||||||
|
while(!pSqlServer->Step(&End, pError, ErrorSize) && !End)
|
||||||
|
{
|
||||||
|
char aName[MAX_NAME_LENGTH];
|
||||||
|
pSqlServer->GetString(1, aName, sizeof(aName));
|
||||||
|
float Time = pSqlServer->GetFloat(2);
|
||||||
|
str_time_float(Time, TIME_HOURS_CENTISECS, aTime, sizeof(aTime));
|
||||||
|
int Rank = pSqlServer->GetInt(3);
|
||||||
|
str_format(pResult->m_Data.m_aaMessages[Line], sizeof(pResult->m_Data.m_aaMessages[Line]),
|
||||||
|
"%d. %s Time: %s", Rank, aName, aTime);
|
||||||
Line++;
|
Line++;
|
||||||
}
|
}
|
||||||
if(!End)
|
if(!End)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
str_copy(pResult->m_Data.m_aaMessages[Line], "-------------------------------", sizeof(pResult->m_Data.m_aaMessages[Line]));
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ struct CScorePlayerResult : ISqlResult
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MAX_MESSAGES = 7,
|
MAX_MESSAGES = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Variant
|
enum Variant
|
||||||
|
@ -167,6 +167,7 @@ struct CSqlPlayerRequest : ISqlData
|
||||||
char m_RequestingPlayer[MAX_NAME_LENGTH];
|
char m_RequestingPlayer[MAX_NAME_LENGTH];
|
||||||
// relevant for /top5 kind of requests
|
// relevant for /top5 kind of requests
|
||||||
int m_Offset;
|
int m_Offset;
|
||||||
|
char m_Server[5];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CSqlRandomMapRequest : ISqlData
|
struct CSqlRandomMapRequest : ISqlData
|
||||||
|
@ -291,7 +292,7 @@ class CScore
|
||||||
static bool MapInfoThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
static bool MapInfoThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
||||||
static bool ShowRankThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
static bool ShowRankThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
||||||
static bool ShowTeamRankThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
static bool ShowTeamRankThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
||||||
static bool ShowTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
static bool ShowTopThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
||||||
static bool ShowTeamTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
static bool ShowTeamTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
||||||
static bool ShowPlayerTeamTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
static bool ShowPlayerTeamTop5Thread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
||||||
static bool ShowTimesThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
static bool ShowTimesThread(IDbConnection *pSqlServer, const ISqlData *pGameData, char *pError, int ErrorSize);
|
||||||
|
@ -340,7 +341,7 @@ public:
|
||||||
|
|
||||||
void SaveTeamScore(int *pClientIDs, unsigned int Size, float Time, const char *pTimestamp);
|
void SaveTeamScore(int *pClientIDs, unsigned int Size, float Time, const char *pTimestamp);
|
||||||
|
|
||||||
void ShowTop5(int ClientID, int Offset = 1);
|
void ShowTop(int ClientID, int Offset = 1);
|
||||||
void ShowRank(int ClientID, const char *pName);
|
void ShowRank(int ClientID, const char *pName);
|
||||||
|
|
||||||
void ShowTeamTop5(int ClientID, int Offset = 1);
|
void ShowTeamTop5(int ClientID, int Offset = 1);
|
||||||
|
|
Loading…
Reference in a new issue