SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/chiller/Desktop/git/DDnetPP/src/game/server/gamecontext.cpp:213:23 in
/home/chiller/Desktop/git/DDnetPP/src/game/server/gamecontext.cpp:214:27: runtime error: nan is outside the range of representable values of type 'int'
#0 0xf050a3 in CGameContext::CreateDamageInd(vector2_base<float>, float, int, long) /home/chiller/Desktop/git/DDnetPP/src/game/server/gamecontext.cpp:214:27
#1 0xec1f30 in CProjectile::Tick() /home/chiller/Desktop/git/DDnetPP/src/game/server/entities/projectile.cpp:237:18
#2 0x11f8eaf in CGameWorld::Tick() /home/chiller/Desktop/git/DDnetPP/src/game/server/gameworld.cpp:272:11
#3 0xf24ebf in CGameContext::OnTick() /home/chiller/Desktop/git/DDnetPP/src/game/server/gamecontext.cpp:893:10
#4 0x57c4a9 in CServer::Run() /home/chiller/Desktop/git/DDnetPP/src/engine/server/server.cpp:2697:19
#5 0x5b3b2b in main /home/chiller/Desktop/git/DDnetPP/src/engine/server/server.cpp:3770:21
#6 0x7f9ea2ed3d09 in __libc_start_main csu/../csu/libc-start.c:308:16
#7 0x42fde9 in _start (/home/chiller/Desktop/git/DDnetPP/build/DDNetPP+0x42fde9)
sorri irc :Dvalgrind --show-reachable=yes --show-possibly-lost=yes --error-limit=no --log-fd=2 --track-fds=yes --trace-children=yes --redzone-size=256 --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt --fair-sched=yes
bool CBinds::OnInput(IInput::CEvent e)
{
// ...
if(!Mask)
Mask = 1 << MODIFIER_NONE;
and
int CBinds::GetModifierMask(IInput *i)
{
// ...
if(!Mask)
return 1 << CBinds::MODIFIER_NONE;
On the other hand, the default bindings are set up via calls like Bind(KEY_A, "+left");
which expands to Bind(KEY_A, "+left", /* FreeOnly */ false, /* ModifierCombination */ 0);
This leads to a bug — binds which just set from the user input events are saved in e.g. m_aapKeyBindings[1]['a'], and the default binds are still there in m_aapKeyBindings[0]['a'] which leads to binds duplication in the UI.
https://github.com/ddnet/ddnet/blob/15.5-devel/src/game/client/components/binds.cpp#L143bool CBinds::OnInput(IInput::CEvent e)
{
// ...
if(!Mask)
Mask = 1 << MODIFIER_NONE;
and
int CBinds::GetModifierMask(IInput *i)
{
// ...
if(!Mask)
return 1 << CBinds::MODIFIER_NONE;
On the other hand, the default bindings are set up via calls like Bind(KEY_A, "+left");
which expands to Bind(KEY_A, "+left", /* FreeOnly */ false, /* ModifierCombination */ 0);
This leads to a bug — binds which just set from the user input events are saved in e.g. m_aapKeyBindings[1]['a'], and the default binds are still there in m_aapKeyBindings[0]['a'] which leads to binds duplication in the UI.
https://github.com/ddnet/ddnet/blob/15.5-devel/src/game/client/components/binds.cpp#L143 infclass
) is not compatible with 0.7 so I have little interest in the upstream (I send PRs to the upstream just because it is "the right way" but probably nowadays DDNet have more reasons to be considered as the upstream. Oh, I don't want to start a holy war )
I actually tried to rewrite the mod ontop of 0.7 but they screwed up mods support so why mod dev would care of teeworlds if teeworlds does not care about mods? Okay, they partially restored the ability to change skins, but e.g. 'global sound' is still missing, gametypes squashed into the generic game controller, etc. What a mess. (edited)bool CBinds::OnInput(IInput::CEvent e)
{
// ...
if(!Mask)
Mask = 1 << MODIFIER_NONE;
and
int CBinds::GetModifierMask(IInput *i)
{
// ...
if(!Mask)
return 1 << CBinds::MODIFIER_NONE;
On the other hand, the default bindings are set up via calls like Bind(KEY_A, "+left");
which expands to Bind(KEY_A, "+left", /* FreeOnly */ false, /* ModifierCombination */ 0);
This leads to a bug — binds which just set from the user input events are saved in e.g. m_aapKeyBindings[1]['a'], and the default binds are still there in m_aapKeyBindings[0]['a'] which leads to binds duplication in the UI.
https://github.com/ddnet/ddnet/blob/15.5-devel/src/game/client/components/binds.cpp#L143