






















Jelly is another map, but this uses yet another speedtile bug 








else if(Direction.x < -0.0000001f || (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) && Direction.x < 0.0000001f))
vs
else if(Direction.x < (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) ? 0.0000001f : -0.0000001f))



else if(Direction.x < -0.0000001f || (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) && Direction.x < 0.0000001f))
vs
else if(Direction.x < (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) ? 0.0000001f : -0.0000001f)) GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) is true then the first is equivalent to else if(Direction.x < -0.0000001f || Direction.x < 0.0000001f) which is not the same as the original buggy version
else if(Direction.x < -0.0000001f || Direction.x < 0.0000001f) is the same as else if(Direction.x < 0.0000001f) which is the original buggy version




GameServer()->EmulateBug is expensive, my variant is cheaper, that's why I wrote it like this, I am going to take a look at EmulteBug








mapbug server setting, otherwise the hardcoded mapbug hashes are brittle and will break if any of the maps are changed later
+--------------+ defs {%1, %2}
|%0: | uses {%1}
|%1 = 1 + 1 | in {%1, %4}
|%2 = 0 + %1 | out {%1, %2, %4}
|goto %3 |
+--------------+
+--------------+ defs {%4}
|%3: | uses {%1, %2, %4}
|%4 = %1 + %2 | in {%1, %2, %4}
|ret %4 | out β
+--------------+
but it gives a weird in variables for block %0 block, is it my skill issues or it's the correct answer?
UPD. uses were calculated wrongly (edited)
























std::find compares the addresses of the strings and not the strings' contents

std::find, or use std::find_if and pass a predicate lambda that uses str_comp to find the matching entry. By default std::find will compare objects with ==, so it will compare the strings' addresses.

std::optional if you want to represent the absence of a value instead using a magic value like -1




std::string sparingly though
NewIndexInfo.m_Flag = CheckIndexFlag(NewIndexInfo.m_Flag, aOrientation1, true);
if(NewIndexInfo.m_Flag == 0 && str_comp(aOrientation1, "NONE"))
NewIndexInfo.m_TestFlag = false;


malloc manually, but we don't want to use std::strings where performance matters



scripts/gen_keys.py script and fix various issues. Avoid duplicate code and make script more extensible by using loops and functions.
Avoid clang-tidy NOLINT(misc-definitions-in-headers) by moving the definition of the key names from the keynames.h header to the keynames.cpp source file.
Reorder the joystick hat keys so the order is consistent with the mouse wheel directions.
Improve various related comments.
Also check style of keys.h, keynames.h...




