ChillerDragon:
and he will get pinged on IRCmod Main {
extern fn malloc(bytes: u64) -> *mut u8;
extern fn free(ptr: *mut u8);
pub fn main(argc: i32, argv: *const *const i32) -> i32 {
let x: *mut u8 = malloc(32);
free(x);
return 0;
}
}
*const *const u8
, I guess? (edited)*const *const u8
, I guess? (edited)char
is a u8
or i8
c_char
type in crate libc
.mod Main {
extern fn malloc(size: u64) -> *mut u8;
extern fn free(ptr: *const u8);
pub fn main(argc: i32, argv: *const *const u8) -> i32 {
let x: *mut u8 = malloc(32);
free(x);
return 0;
}
}
; ModuleID = 'Main'
source_filename = "program.ed"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
declare !dbg !2 ptr @malloc(i64)
declare !dbg !9 void @free(ptr)
define i32 @main(i32 %0, ptr %1) !dbg !13 {
entry:
call void @llvm.dbg.value(metadata ptr %1, metadata !21, metadata !DIExpression()), !dbg !23
call void @llvm.dbg.value(metadata i32 %0, metadata !19, metadata !DIExpression()), !dbg !24
%return_ptr = alloca i32, align 4, !dbg !25
%argc = alloca i32, align 4, !dbg !24
store i32 %0, ptr %argc, align 4, !dbg !24
%argv = alloca ptr, align 8, !dbg !23
store ptr %1, ptr %argv, align 8, !dbg !23
%x = alloca ptr, align 8, !dbg !26
%temp_var_4 = alloca ptr, align 8, !dbg !26
br label %block_0, !dbg !26
block_0: ; preds = %entry
%2 = call ptr @malloc(i64 32), !dbg !27
store ptr %2, ptr %temp_var_4, align 8, !dbg !27
br label %block_1, !dbg !27
block_1: ; preds = %block_0
call void @llvm.dbg.declare(metadata ptr %x, metadata !22, metadata !DIExpression()), !dbg !26
%3 = load ptr, ptr %temp_var_4, align 8, !dbg !28
call void @llvm.dbg.value(metadata ptr %3, metadata !22, metadata !DIExpression()), !dbg !26
store ptr %3, ptr %x, align 8, !dbg !28
%4 = load ptr, ptr %x, align 8, !dbg !29
call void @free(ptr %4), !dbg !29
br label %block_2, !dbg !29
block_2: ; preds = %block_1
store i32 0, ptr %return_ptr, align 4, !dbg !30
%5 = load i32, ptr %return_ptr, align 4, !dbg !31
ret i32 %5, !dbg !31
}
define i32 @main(i32 %0, ptr nocapture readnone %1) local_unnamed_addr #0 !dbg !2 {
entry:
ret i32 0, !dbg !20
}
optimized xd (edited)mod Main {
extern fn malloc(bytes: u64) -> *mut u8;
extern fn free(ptr: *mut u8);
pub fn main(argc: i32, argv: *const *const i32) -> i32 {
let x: *mut u8 = malloc(32);
free(x);
return 0;
}
}
TreeSize Free
is better option I think (edited)qdirstat
is open-source and pretty much the linux equivalent of windirstate afaikncdu
on linuxtwgpu-map-photography.exe .\Basketball.map .
Error: IoError(Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." })
but why ?twgpu-map-photography.exe .\Basketball.map .
Error: IoError(Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." })
but why ? twgpu-map-photography.exe .\Basketball.map .
Error: IoError(Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." })
but why ? ddracechat.h
was deleted, so to resolve the conflict you need to delete the file and add the command registration in gamecontext.cpp
instead (it conflicts because of #7919) (edited)ddracechat.h
was deleted, so to resolve the conflict you need to delete the file and add the command registration in gamecontext.cpp
instead (it conflicts because of #7919) (edited)Query id: f441b2cb-9ede-41d6-a781-c3475245604a
┌─client_name─────┬─client_playtime_total_hours─┐
│ nameless tee │ 35311.90416666667 │
│ 1 │ 10661.709722222224 │
│ ChillerDragon │ 10318.552777777777 │
│ brainless tee │ 9041.169444444444 │
│ . │ 7737.541666666667 │
│ kais │ 5385.254166666667 │
│ chillerbot-zx │ 5193.144444444445 │
│ 异教 │ 4978.847222222222 │
│ Colo-Colo │ 4602.886111111112 │
│ (1)nameless tee │ 4269.986111111111 │
│ (1)kais │ 4218.841666666666 │
│ wlszd │ 4062.551388888889 │
│ Bonobobo │ 3995.2569444444443 │
│ ]GameReady[ │ 3940.2708333333335 │
│ 月满 │ 3849.2597222222225 │
│ 123 │ 3763.597222222222 │
│ 峰峰 │ 3735.4902777777775 │
│ prore │ 3432.5333333333333 │
│ Noob Redis │ 3403.4375 │
│ 7% │ 3392.561111111111 │
└─────────────────┴─────────────────────────────┘
20 rows in set. Elapsed: 1.790 sec. Processed 9.75 million rows, 248.63 MB (5.44 million rows/s., 138.89 MB/s.)
Peak memory usage: 311.27 MiB.
ChillerDragon: afk king? Query id: f441b2cb-9ede-41d6-a781-c3475245604a
┌─client_name─────┬─client_playtime_total_hours─┐
│ nameless tee │ 35311.90416666667 │
│ 1 │ 10661.709722222224 │
│ ChillerDragon │ 10318.552777777777 │
│ brainless tee │ 9041.169444444444 │
│ . │ 7737.541666666667 │
│ kais │ 5385.254166666667 │
│ chillerbot-zx │ 5193.144444444445 │
│ 异教 │ 4978.847222222222 │
│ Colo-Colo │ 4602.886111111112 │
│ (1)nameless tee │ 4269.986111111111 │
│ (1)kais │ 4218.841666666666 │
│ wlszd │ 4062.551388888889 │
│ Bonobobo │ 3995.2569444444443 │
│ ]GameReady[ │ 3940.2708333333335 │
│ 月满 │ 3849.2597222222225 │
│ 123 │ 3763.597222222222 │
│ 峰峰 │ 3735.4902777777775 │
│ prore │ 3432.5333333333333 │
│ Noob Redis │ 3403.4375 │
│ 7% │ 3392.561111111111 │
└─────────────────┴─────────────────────────────┘
20 rows in set. Elapsed: 1.790 sec. Processed 9.75 million rows, 248.63 MB (5.44 million rows/s., 138.89 MB/s.)
Peak memory usage: 311.27 MiB.
ChillerDragon: afk king? Query id: f441b2cb-9ede-41d6-a781-c3475245604a
┌─client_name─────┬─client_playtime_total_hours─┐
│ nameless tee │ 35311.90416666667 │
│ 1 │ 10661.709722222224 │
│ ChillerDragon │ 10318.552777777777 │
│ brainless tee │ 9041.169444444444 │
│ . │ 7737.541666666667 │
│ kais │ 5385.254166666667 │
│ chillerbot-zx │ 5193.144444444445 │
│ 异教 │ 4978.847222222222 │
│ Colo-Colo │ 4602.886111111112 │
│ (1)nameless tee │ 4269.986111111111 │
│ (1)kais │ 4218.841666666666 │
│ wlszd │ 4062.551388888889 │
│ Bonobobo │ 3995.2569444444443 │
│ ]GameReady[ │ 3940.2708333333335 │
│ 月满 │ 3849.2597222222225 │
│ 123 │ 3763.597222222222 │
│ 峰峰 │ 3735.4902777777775 │
│ prore │ 3432.5333333333333 │
│ Noob Redis │ 3403.4375 │
│ 7% │ 3392.561111111111 │
└─────────────────┴─────────────────────────────┘
20 rows in set. Elapsed: 1.790 sec. Processed 9.75 million rows, 248.63 MB (5.44 million rows/s., 138.89 MB/s.)
Peak memory usage: 311.27 MiB.
ChillerDragon: afk king? clang-format-10_linux-amd64
binary to /usr/bin/clang-format-10
.SELECT (sum(client_playtime_sec) / 60) / 60 AS client_playtime_total_hours
FROM tee_skin.client_snapshots
WHERE startsWith(lower(server_map_name), 'blmap')
Query id: 26855dd8-1c89-4a75-b778-90dbca05092d
┌─client_playtime_total_hours─┐
│ 525239.1666666666 │
└─────────────────────────────┘
1 row in set. Elapsed: 229.714 sec. Processed 12.63 billion rows, 229.06 GB (54.97 million rows/s., 997.15 MB/s.)
Peak memory usage: 19.40 MiB.
SELECT (sum(client_playtime_sec) / 60) / 60 AS client_playtime_total_hours
FROM tee_skin.client_snapshots
WHERE startsWith(lower(server_map_name), 'blmap')
Query id: 26855dd8-1c89-4a75-b778-90dbca05092d
┌─client_playtime_total_hours─┐
│ 525239.1666666666 │
└─────────────────────────────┘
1 row in set. Elapsed: 229.714 sec. Processed 12.63 billion rows, 229.06 GB (54.97 million rows/s., 997.15 MB/s.)
Peak memory usage: 19.40 MiB.
┌─client_playtime_total_hours─┐
│ 1708114.6722222222 │
└─────────────────────────────┘
CGameContext::OnMapChange(...)
being called before map change even if map couldn't be loadOnMapChange
reads the map settings from cfg
files and writes them to the map
file, which needs to happen before the map is loaded. Maybe should be renamed to BeforeMapChange
or PrepareMapChange
instead.OnInit
insteadCScore::SaveTeam
saves g_Config.m_SvMap
as the map, which is already the new map when LoadMap
is calledg_Config.m_SvMap
is changed after CGameContext::OnMapChange(...)
call not beforeConchainMapUpdate
, which sets m_MapReload = true
if the map has changedCServer::m_aCurrentMap
as an argument to those CScore
functions instead of using the configpNewMapName
is just useless pNewMapName
and g_Config.m_SvMap
are used and its strangepNewMapName
is the output for the function, but it shouldn't modify the value of the config variablepNewMapName
is the output for the function, but it shouldn't modify the value of the config variable char *
Server()->GetMapName()
is also g_Config
GetCurrentMapName
to the server interface?GetCurrentMapName
to the server interface? GetMapName
should use m_aCurrentMap
instead of g_Config.m_SvMap
, since using the config variable anywhere potentially leads to issues with it not being synchronized with the current map[ 611.504262] usb 3-4: USB disconnect, device number 2
[ 615.890835] usb 3-4: new high-speed USB device number 3 using xhci_hcd
[ 616.019623] usb 3-4: New USB device found, idVendor=20b1, idProduct=3008, bcdDevice= 7.40
[ 616.019628] usb 3-4: New USB device strings: Mfr=1, Product=3, SerialNumber=2
[ 616.019630] usb 3-4: Product: iFi (by AMR) HD USB Audio
[ 616.019632] usb 3-4: Manufacturer: iFi (by AMR)
[ 616.019633] usb 3-4: SerialNumber: 0003
[ 616.232121] usb 3-4: 1:4 : unsupported format bits 0x100000000
[ 616.333370] usb 3-4: Warning! Unlikely big volume range (=32512), cval->res is probably wrong.
[ 616.333373] usb 3-4: [10] FU [iFi (by AMR) HD USB Audio Playback Volume] ch = 2, val = -32512/0/1
[ 616.336368] usb 3-4: Warning! Unlikely big volume range (=32512), cval->res is probably wrong.
[ 616.336371] usb 3-4: [10] FU [iFi (by AMR) HD USB Audio Playback Volume] ch = 1, val = -32512/0/1
[ 616.339138] hid-generic 0003:20B1:3008.0008: hiddev96,hidraw0: USB HID v1.10 Device [iFi (by AMR) iFi (by AMR) HD USB Audio] on usb-0000:2d:00.3-4/input3
WIN32_LEAN_AND_MEAN
and sometimes also the macro _WIN32_WINNT
in each file that directly or indirectly includes `, only define these macros once consistently in
CMakeLists.txt.
Also define
NTDDI_VERSION, which is the new macro to specify the minimum Windows version starting with Windows Vista. This macro needs to be defined in addition to old
_WIN32_WINNT` macro, according to the documentation.
See https://learn.microsoft.com/en-us/windows/win32/w...str_copy(m_aCurrentMap, ...)
is after OnMapChange
has been called.dbg_msg
in multiple places to find out the order of operations I guessLoadMap(...)
is calledm_aCurrentMap
, one in the CServer
constructor and the other in LoadMap
. (edited)m_aCurrentMap
has to be unchanged when LoadMap
fails because it's used to restore the previous value of sv_map
if the map failed to load // get the name of the map without his path
const char *pMapShortName = m_aCurrentMap;
for(int i = 0; i < str_length(m_aCurrentMap) - 1; i++)
{
if(Config()->m_SvMap[i] == '/' || Config()->m_SvMap[i] == '\\')
pMapShortName = &m_aCurrentMap[i + 1];
}
return pMapShortName;
// get the name of the map without his path
const char *pMapShortName = &Config()->m_SvMap[0];
for(int i = 0; i < str_length(Config()->m_SvMap) - 1; i++)
{
if(Config()->m_SvMap[i] == '/' || Config()->m_SvMap[i] == '\\')
pMapShortName = &m_aCurrentMap[i + 1];
}
return pMapShortName;
m_aCurrentMap
m_aCurrentMap
// get the name of the map without his path
const char *pMapName = m_aCurrentMap;
const char *pMapShortName = pMapName;
for(int i = 0; i < str_length(pMapName) - 1; i++)
{
if(pMapName[i] == '/' || pMapName[i] == '\\')
pMapShortName = &pMapName[i + 1];
}
return pMapShortName;
CScore
so i should run this job blocking or use it as isCScore
so i should run this job blocking or use it as is [ 611.504262] usb 3-4: USB disconnect, device number 2
[ 615.890835] usb 3-4: new high-speed USB device number 3 using xhci_hcd
[ 616.019623] usb 3-4: New USB device found, idVendor=20b1, idProduct=3008, bcdDevice= 7.40
[ 616.019628] usb 3-4: New USB device strings: Mfr=1, Product=3, SerialNumber=2
[ 616.019630] usb 3-4: Product: iFi (by AMR) HD USB Audio
[ 616.019632] usb 3-4: Manufacturer: iFi (by AMR)
[ 616.019633] usb 3-4: SerialNumber: 0003
[ 616.232121] usb 3-4: 1:4 : unsupported format bits 0x100000000
[ 616.333370] usb 3-4: Warning! Unlikely big volume range (=32512), cval->res is probably wrong.
[ 616.333373] usb 3-4: [10] FU [iFi (by AMR) HD USB Audio Playback Volume] ch = 2, val = -32512/0/1
[ 616.336368] usb 3-4: Warning! Unlikely big volume range (=32512), cval->res is probably wrong.
[ 616.336371] usb 3-4: [10] FU [iFi (by AMR) HD USB Audio Playback Volume] ch = 1, val = -32512/0/1
[ 616.339138] hid-generic 0003:20B1:3008.0008: hiddev96,hidraw0: USB HID v1.10 Device [iFi (by AMR) iFi (by AMR) HD USB Audio] on usb-0000:2d:00.3-4/input3
LEGACY_SAVE_CODE
or somethingCScore::SaveTeam(...)
behaviour (edited)"Team save in progress. You'll be able to load with '/load %s'"
CScore::SaveTeam(...)
behaviour (edited)SaveTeam
is called from main thread though char aBuf[512];
if(Tmp->m_aCode[0] == '\0')
{
str_format(aBuf,
sizeof(aBuf),
"Team save in progress. You'll be able to load with '/load %s'",
Tmp->m_aGeneratedCode);
}
else
{
str_format(aBuf,
sizeof(aBuf),
"Team save in progress. You'll be able to load with '/load %s' if save is successful or with '/load %s' if it fails",
Tmp->m_aCode,
Tmp->m_aGeneratedCode);
}
pController->Teams().KillSavedTeam(ClientID, Team);
GameServer()->SendChatTeam(Team, aBuf);
CMenus::Render
function by extracting the code for rendering the fullscreen popups into a separate function.
Note the diff is significantly shorter when ignoring whitespace.
Jobs.AbortAbortable