












-DDEV=ON, if you want








-DDEV=ON?



-DDEV=ON is when you're developing

-DDEV=ON





CFLAGS=…

CMAKE_* variables





7eb3a78 Add HTTP masterserver registering and HTTP masterserver - heinrich5991
41f9818 mastersrv: Add 0.7 support and other stuff - heinrich5991
b03a8ae x - heinrich5991
7f80dbd Fix memleak of multiply chained console commands - heinrich5991
9ce1a20 bb - heinrich5991
fb0f051 Cut some dependencies - heinrich5991
82afa0d among others: make info serial a number - heinrich5991
28083d1 more - heinrich5991
01f57df more - heinrich5991
e46a5d4 fix ipv6 - heinrich5991
5678d32 kill the whole process if a task fails - heinrich5991
d7d50c4 send non-info fields via http headers - heinrich5991
a73ef22 Make dbg_curl 1 use the normal logging - heinrich5991
297d0cc Don't resend server info the masterserver already knows - heinrich5991
319ce10 Make server info buffer size large enough - heinrich5991
5e85926 Make mastersrv restartable without losing a lot of data - heinrich5991
5549ccc Separate challenge token, add register extra fields again and handle Content-Type - heinrich5991
222fe1d Remove backward compatibility in mastersrv - heinrich5991
c082a84 Add crude port forward error message in the style of the old one - heinrich5991
1













CNetObj_GameInfo *pGameInfoObj = (CNetObj_GameInfo *)Server()->SnapNewItem(NETOBJTYPE_GAMEINFO, 0, sizeof(CNetObj_GameInfo));
But it makes no sense to repeat CNetObj_GameInfo three times and use the only correct NETOBJTYPE.
With one line for codegen and for lines for engine/server.h:
--- datasrc/datatypes.py
+++ datasrc/datatypes.py
@@ -218,6 +218,7 @@ class NetObject:
. . . lines = ["struct %s : public %s"%(self.struct_name,self.base_struct_name), "{"]
. . else:
. . . lines = ["struct %s"%self.struct_name, "{"]
+. . lines += ["\tstatic const int ObjectType = %s;" % self.enum_name]
. . for v in self.variables:
. . . lines += ["\t"+line for line in v.emit_declaration()]
. . lines += ["};"]
--- src/engine/server.h
+++ src/engine/server.h
@@ -279,6 +279,13 @@ public:
. virtual void SnapFreeID(int ID) = 0;
. virtual void *SnapNewItem(int Type, int ID, int Size) = 0;
+. template <typename T>
+. T *SnapNewItem(int ID)
+. {
+. . int Type = T::ObjectType;
+. . (T *)SnapNewItem(Type, ID, sizeof(T));
+. }
we can turn messes into a nice and clear code:
CNetObj_Character *pCharacter = static_cast<CNetObj_Character *>(Server()->SnapNewItem(NETOBJTYPE_CHARACTER, ID, sizeof(CNetObj_Character)));
CNetObj_Character *pCharacter = Server()->SnapNewItem<CNetObj_Character>(ID);
// or even
auto *pCharacter = Server()->SnapNewItem<CNetObj_Character>(ID);
Deal? 
static const int maybe a constexpr just to make sure ?


static const int maybe a constexpr just to make sure ? protocol7 but it's not a big deal.



SnapNewObject() or something like that; it will be easy to rename during CR).
auto *pCharacter = Server()->SnapNewItem<CNetObj_Character>(ID);CNetObj_Character *pCharacter = Server()->SnapNewItem(ID);

@Robyt3#2709 opinion from the teeworlds refactoring perspective. Would that interfere with your changes or maybe I should send PR to teeworlds first?



Type is a value from NETOBJTYPE_ anonymous enum.
ID is an integer with this_type instance number.
E.g. for CNetObj_Laser valid IDs in the mod I'm maintaining can reach hundreds.
int Type)

int Type is now hidden / not needed for this SnapNewObject().

CNetObj_GameInfo *pGameInfoObj = (CNetObj_GameInfo *)Server()->SnapNewItem(NETOBJTYPE_GAMEINFO, 0, sizeof(CNetObj_GameInfo));
But it makes no sense to repeat CNetObj_GameInfo three times and use the only correct NETOBJTYPE.
With one line for codegen and for lines for engine/server.h:
--- datasrc/datatypes.py
+++ datasrc/datatypes.py
@@ -218,6 +218,7 @@ class NetObject:
. . . lines = ["struct %s : public %s"%(self.struct_name,self.base_struct_name), "{"]
. . else:
. . . lines = ["struct %s"%self.struct_name, "{"]
+. . lines += ["\tstatic const int ObjectType = %s;" % self.enum_name]
. . for v in self.variables:
. . . lines += ["\t"+line for line in v.emit_declaration()]
. . lines += ["};"]
--- src/engine/server.h
+++ src/engine/server.h
@@ -279,6 +279,13 @@ public:
. virtual void SnapFreeID(int ID) = 0;
. virtual void *SnapNewItem(int Type, int ID, int Size) = 0;
+. template <typename T>
+. T *SnapNewItem(int ID)
+. {
+. . int Type = T::ObjectType;
+. . (T *)SnapNewItem(Type, ID, sizeof(T));
+. }
we can turn messes into a nice and clear code:
CNetObj_Character *pCharacter = static_cast<CNetObj_Character *>(Server()->SnapNewItem(NETOBJTYPE_CHARACTER, ID, sizeof(CNetObj_Character)));
CNetObj_Character *pCharacter = Server()->SnapNewItem<CNetObj_Character>(ID);
// or even
auto *pCharacter = Server()->SnapNewItem<CNetObj_Character>(ID);
Deal? 








protocol is a part of the game or engine?
Engine message.h includes protocol.h which includes mapitems_ex.h which makes the engine depending on mapitems_ex.cpp which is a part of game.
This ruined my attempt to clearly split engine and game libraries. 
protocol is game
































Run scripts/fix_style.py --dry-run
src/game/client/gameclient.cpp:725:86: error: code should be clang-formatted [-Wclang-format-violations]
m_multiplierMultiView = MapValue(maxCameraDist, minCameraDist, maxVel, minVel, tmp);
^
Error: Process completed with exit code 1.
Someone knows what the f problem is here? apart from naming conventions (edited)


python3 scripts/fix_style

PATH variablePATH=/path/to/clang/format/10 python3 scripts/fix_style.py












































editor.trimAutoWhitespace (edited)



s/\s*$//g






















755c260 Add HUD Sprites, LoadHudSkin() and HUD Assets Tab - C0D3D3V
53e1218 Return the quad offset of the first added quad, when adding new quads - Jupeyy
a0164df Small cleanup of HUD + comment on distance calculation at sound - C0D3D3V
b23811b show local available and used jumps, in spec only available jumps - C0D3D3V
7abeaf0 Preparations for the new HUD - C0D3D3V
5ac46f9 Many new indicators have been added to the HUD - C0D3D3V
320e9e0 Rename Read() function to avoid equal naming - C0D3D3V
3957a74 move m_Ninja in Character Core - C0D3D3V
de750e8 display ninja Bar - C0D3D3V
b942b7a Show weapon no hit only if the tee got the weapon - C0D3D3V
63d4591 Make Ninja Bar Smooth - C0D3D3V
78a0a3d add deep and live frozen display - C0D3D3V
b403f47 Add Freeze Bar - C0D3D3V
e71578e Add DDNetCharacterDisplayInfo NetObj - C0D3D3V
09bd106 increase height of freeze bar - C0D3D3V
a4b6558 load CNetObj_DDNetCharacterDisplayInfo into CCharacter - C0D3D3V
670da66 add vertical ninja bar - C0D3D3V
6159b18 use QuadsSetSubsetFree also for freeze bar - C0D3D3V
ef468e8 remove constant scaling factors and constant y offset - C0D3D3V
940047f Add Practice Mode Symbol next to the timer - C0D3D3V
be75b80 Render Dummy Actions on the right side of the screen - C0D3D3V
a9c8b34 Player position, speed and angle can now be displayed in the HUD. - C0D3D3V
9dc2141 remove shadow variables - C0D3D3V
0c4dfb6 Add Options for new HUD - C0D3D3V
fa2ac1b Merge branch 'master' into New_HUD - C0D3D3V
796b2ad Fix Weapon Shields rendering and Clean up Sprite Offsets in items.cpp - C0D3D3V
d6833b6 fix jump display - C0D3D3V
47874fb Merge #5085 - bors[bot]