

















































bool CServer::SetClientSkinImpl(int ClientId, const char *pSkinRequest, bool Set)
{
dbg_assert(0 <= ClientId && ClientId < MAX_CLIENTS, "invalid client id");
if(m_aClients[ClientId].m_State < CClient::STATE_READY)
return false;
// trim the skin
char aTrimmedSkin[MAX_SKIN_LENGTH];
str_copy(aTrimmedSkin, str_utf8_skip_whitespaces(pSkinRequest));
str_utf8_trim_right(aTrimmedSkin);
bool Changed = str_comp(m_aClients[ClientId].m_aSkin, aTrimmedSkin) != 0;
if(Set)
{
// set the client skin
str_copy(m_aClients[ClientId].m_aSkin, aTrimmedSkin);
}
return Changed;
}
-# i connected this codeblock to gamecontext.cpp and call it, but when i enter player_skin command, nothing happens





















1 warning and 20 errors generated ah i thought sdl3 and sdl2 were similar enough xd
pChr->SetPosition(Pos);pChr->m_Pos = Pos like a crazy person.
It is not needed right now because the values are synced on tick. But to me it just seems wrong to not set the position in a method literally called SetPosition.
As a easter egg the diff between syncing the postion on call vs on tick unlocks some interesting new teleportation exploits. 









git log -S is your best friend




git clone https://github.com/libsdl-org/SDL;cd SDL;git log -S$FuncNameYouMissFromSDL2




































let program = Program {
globals: vec![],
functions: vec![Function {
registers: vec![Register {
name: "1".into(),
ty: Ty::I8,
}],
name: "main".into(),
blocks: vec![BasicBlock {
name: "0".into(),
instructions: vec![Instruction::Copy {
operand: Operand::Const(ValueTree::Leaf(Const::I8(0x45))),
place: Place::Register(0),
}],
terminator: Terminator::Return(Some(Operand::Place(Place::Register(0)))),
}],
params: vec![],
ret_ty: Ty::I8,
}],
};
I can finally generate assembly for dis








































extern bool SDL_SetRelativeMouseMode(bool enabled);
extern bool SDL_GetRelativeMouseMode(void);
bool SDL_SetWindowRelativeMouseMode(SDL_Window *window, bool enabled)
SDL_GetKeyboardFocus()

void *) and then you cast back to SDL_Window * to avoid the dependency on SDL in the engine API


void *) and then you cast back to SDL_Window * to avoid the dependency on SDL in the engine API 
dynamic_cast is usually wrong if you don't know what you are doing

dynamic_cast is usually wrong if you don't know what you are doing 


Graphics()->SetWindowGrab which is probably similar





















str_copy call on line 17


















ERROR SUMMARY: 4166 errors from 21 contexts (suppressed: 0 from 0)) from seemingly unrelated changes?
Could changes in the overall memory layout cause this?

CGameClient constructor. Maybe the default when no constructor is used defaults to zeroing the memory?

CGameClient's value initialization because there is no constructor














