ChillerDragon
732798444c
More detailed snapshot debug dump
...
The method CSnapShot::DebugDump() used to print just the raw snap items.
Without item names or field names:
```
2024-04-07 09:10:01 I snapshot: data_size=356 num_items=10
2024-04-07 09:10:01 I snapshot: type=0 id=32767
2024-04-07 09:10:01 I snapshot: 0 -1824658838 933dea6a
2024-04-07 09:10:01 I snapshot: 1 -629591830 da7930ea
2024-04-07 09:10:01 I snapshot: 2 -1450210576 a98f8af0
2024-04-07 09:10:01 I snapshot: 3 914991429 3689a945
2024-04-07 09:10:01 I snapshot: type=0 id=32766
2024-04-07 09:10:01 I snapshot: 0 583701389 22ca938d
2024-04-07 09:10:01 I snapshot: 1 327171627 13803e2b
2024-04-07 09:10:01 I snapshot: 2 -1636052395 9e7bd255
2024-04-07 09:10:01 I snapshot: 3 -1901674991 8ea6be11
2024-04-07 09:10:01 I snapshot: type=0 id=32765
2024-04-07 09:10:01 I snapshot: 0 1993229659 76ce455b
2024-04-07 09:10:01 I snapshot: 1 -102024632 f9eb3a48
2024-04-07 09:10:01 I snapshot: 2 -1378361269 add7e04b
2024-04-07 09:10:01 I snapshot: 3 -1810037668 941d045c
2024-04-07 09:10:01 I snapshot: type=6 id=0
2024-04-07 09:10:01 I snapshot: 0 0 00000000
2024-04-07 09:10:01 I snapshot: 1 0 00000000
2024-04-07 09:10:01 I snapshot: 2 0 00000000
2024-04-07 09:10:01 I snapshot: 3 0 00000000
2024-04-07 09:10:01 I snapshot: 4 0 00000000
2024-04-07 09:10:01 I snapshot: 5 0 00000000
2024-04-07 09:10:01 I snapshot: 6 0 00000000
2024-04-07 09:10:01 I snapshot: 7 1 00000001
2024-04-07 09:10:01 I snapshot: type=32767 id=0
2024-04-07 09:10:01 I snapshot: 0 247983155 0ec7ec33
2024-04-07 09:10:01 I snapshot: 1 9 00000009
2024-04-07 09:10:01 I snapshot: 2 64 00000040
2024-04-07 09:10:01 I snapshot: type=11 id=0
2024-04-07 09:10:01 I snapshot: 0 -1008145940 c3e8e9ec
2024-04-07 09:10:01 I snapshot: 1 -320474428 ece5f2c4
2024-04-07 09:10:01 I snapshot: 2 -220076049 f2e1e7ef
2024-04-07 09:10:01 I snapshot: 3 -293568512 ee808000
2024-04-07 09:10:01 I snapshot: 4 -1330727040 b0aeb780
2024-04-07 09:10:01 I snapshot: 5 -2139062144 80808080
2024-04-07 09:10:01 I snapshot: 6 -2139062272 80808000
2024-04-07 09:10:01 I snapshot: 7 64 00000040
2024-04-07 09:10:01 I snapshot: 8 -403511835 e7f2e5e5
2024-04-07 09:10:01 I snapshot: 9 -286001183 eef3f7e1
2024-04-07 09:10:01 I snapshot: 10 -219905920 f2e48080
2024-04-07 09:10:01 I snapshot: 11 -2139062144 80808080
2024-04-07 09:10:01 I snapshot: 12 -2139062144 80808080
2024-04-07 09:10:01 I snapshot: 13 -2139062272 80808000
2024-04-07 09:10:01 I snapshot: 14 0 00000000
2024-04-07 09:10:01 I snapshot: 15 7199301 006dda45
2024-04-07 09:10:01 I snapshot: 16 2345678 0023cace
2024-04-07 09:10:01 I snapshot: type=10 id=0
2024-04-07 09:10:01 I snapshot: 0 1 00000001
2024-04-07 09:10:01 I snapshot: 1 0 00000000
2024-04-07 09:10:01 I snapshot: 2 0 00000000
2024-04-07 09:10:01 I snapshot: 3 -9999 ffffd8f1
2024-04-07 09:10:01 I snapshot: 4 0 00000000
2024-04-07 09:10:01 I snapshot: type=32766 id=0
2024-04-07 09:10:01 I snapshot: 0 1 00000001
2024-04-07 09:10:01 I snapshot: 1 0 00000000
2024-04-07 09:10:01 I snapshot: type=9 id=0
2024-04-07 09:10:01 I snapshot: 0 438 000001b6
2024-04-07 09:10:01 I snapshot: 1 1968 000007b0
2024-04-07 09:10:01 I snapshot: 2 913 00000391
2024-04-07 09:10:01 I snapshot: 3 0 00000000
2024-04-07 09:10:01 I snapshot: 4 0 00000000
2024-04-07 09:10:01 I snapshot: 5 0 00000000
2024-04-07 09:10:01 I snapshot: 6 0 00000000
2024-04-07 09:10:01 I snapshot: 7 0 00000000
2024-04-07 09:10:01 I snapshot: 8 -1 ffffffff
2024-04-07 09:10:01 I snapshot: 9 0 00000000
2024-04-07 09:10:01 I snapshot: 10 0 00000000
2024-04-07 09:10:01 I snapshot: 11 1968 000007b0
2024-04-07 09:10:01 I snapshot: 12 913 00000391
2024-04-07 09:10:01 I snapshot: 13 0 00000000
2024-04-07 09:10:01 I snapshot: 14 0 00000000
2024-04-07 09:10:01 I snapshot: 15 1 00000001
2024-04-07 09:10:01 I snapshot: 16 10 0000000a
2024-04-07 09:10:01 I snapshot: 17 10 0000000a
2024-04-07 09:10:01 I snapshot: 18 0 00000000
2024-04-07 09:10:01 I snapshot: 19 1 00000001
2024-04-07 09:10:01 I snapshot: 20 5 00000005
2024-04-07 09:10:01 I snapshot: 21 0 00000000
2024-04-07 09:10:01 I snapshot: type=32765 id=0
2024-04-07 09:10:01 I snapshot: 0 49152 0000c000
2024-04-07 09:10:01 I snapshot: 1 0 00000000
2024-04-07 09:10:01 I snapshot: 2 2 00000002
2024-04-07 09:10:01 I snapshot: 3 0 00000000
2024-04-07 09:10:01 I snapshot: 4 0 00000000
2024-04-07 09:10:01 I snapshot: 5 0 00000000
2024-04-07 09:10:01 I snapshot: 6 0 00000000
2024-04-07 09:10:01 I snapshot: 7 0 00000000
2024-04-07 09:10:01 I snapshot: 8 1 00000001
2024-04-07 09:10:01 I snapshot: 9 0 00000000
```
Now there is also `CNetObjHandler::DebugDumpSnapshot(const CSnapshot *pSnap)`
which prints the name of the snap item and also the names of all fields:
```
2024-04-07 09:21:42 I snapshot: data_size=356 num_items=10
2024-04-07 09:21:42 I snapshot: EX/UUID type=0 id=32767 size=16
2024-04-07 09:21:42 I snapshot: 0 -1824658838 933dea6a
2024-04-07 09:21:42 I snapshot: 1 -629591830 da7930ea
2024-04-07 09:21:42 I snapshot: 2 -1450210576 a98f8af0
2024-04-07 09:21:42 I snapshot: 3 914991429 3689a945
2024-04-07 09:21:42 I snapshot: EX/UUID type=0 id=32766 size=16
2024-04-07 09:21:42 I snapshot: 0 583701389 22ca938d
2024-04-07 09:21:42 I snapshot: 1 327171627 13803e2b
2024-04-07 09:21:42 I snapshot: 2 -1636052395 9e7bd255
2024-04-07 09:21:42 I snapshot: 3 -1901674991 8ea6be11
2024-04-07 09:21:42 I snapshot: EX/UUID type=0 id=32765 size=16
2024-04-07 09:21:42 I snapshot: 0 1993229659 76ce455b
2024-04-07 09:21:42 I snapshot: 1 -102024632 f9eb3a48
2024-04-07 09:21:42 I snapshot: 2 -1378361269 add7e04b
2024-04-07 09:21:42 I snapshot: 3 -1810037668 941d045c
2024-04-07 09:21:42 I snapshot: GameInfo type=6 id=0 size=32
2024-04-07 09:21:42 I snapshot: 0 0 00000000 m_GameFlags=0 (min=0 max=256)
2024-04-07 09:21:42 I snapshot: 1 0 00000000 m_GameStateFlags=0 (min=0 max=256)
2024-04-07 09:21:42 I snapshot: 2 0 00000000 m_RoundStartTick=0 (NetTick)
2024-04-07 09:21:42 I snapshot: 3 0 00000000 m_WarmupTimer=0 (min=min_int(-2147483648) max=max_int(2147483647))
2024-04-07 09:21:42 I snapshot: 4 0 00000000 m_ScoreLimit=0 (min=0 max=max_int(2147483647))
2024-04-07 09:21:42 I snapshot: 5 0 00000000 m_TimeLimit=0 (min=0 max=max_int(2147483647))
2024-04-07 09:21:42 I snapshot: 6 0 00000000 m_RoundNum=0 (min=0 max=max_int(2147483647))
2024-04-07 09:21:42 I snapshot: 7 1 00000001 m_RoundCurrent=1 (min=0 max=max_int(2147483647))
2024-04-07 09:21:42 I snapshot: (out of range) type=32767 id=0 size=12
2024-04-07 09:21:42 I snapshot: 0 247983155 0ec7ec33
2024-04-07 09:21:42 I snapshot: 1 9 00000009
2024-04-07 09:21:42 I snapshot: 2 64 00000040
2024-04-07 09:21:42 I snapshot: ClientInfo type=11 id=0 size=68
2024-04-07 09:21:42 I snapshot: 0 -1008145940 c3e8e9ec m_Name0=-1008145940 IntsToStr: Chil
2024-04-07 09:21:42 I snapshot: 1 -320474428 ece5f2c4 m_Name1=-320474428 IntsToStr: lerD
2024-04-07 09:21:42 I snapshot: 2 -220076049 f2e1e7ef m_Name2=-220076049 IntsToStr: rago
2024-04-07 09:21:42 I snapshot: 3 -293568512 ee808000 m_Name3=-293568512 IntsToStr: n
2024-04-07 09:21:42 I snapshot: 4 -1330727040 b0aeb780 m_Clan0=-1330727040 IntsToStr: 0.7
2024-04-07 09:21:42 I snapshot: 5 -2139062144 80808080 m_Clan1=-2139062144 IntsToStr:
2024-04-07 09:21:42 I snapshot: 6 -2139062272 80808000 m_Clan2=-2139062272 IntsToStr:
2024-04-07 09:21:42 I snapshot: 7 64 00000040 m_Country=64
2024-04-07 09:21:42 I snapshot: 8 -403511835 e7f2e5e5 m_Skin0=-403511835 IntsToStr: gree
2024-04-07 09:21:42 I snapshot: 9 -286001183 eef3f7e1 m_Skin1=-286001183 IntsToStr: nswa
2024-04-07 09:21:42 I snapshot: 10 -219905920 f2e48080 m_Skin2=-219905920 IntsToStr: rd
2024-04-07 09:21:42 I snapshot: 11 -2139062144 80808080 m_Skin3=-2139062144 IntsToStr:
2024-04-07 09:21:42 I snapshot: 12 -2139062144 80808080 m_Skin4=-2139062144 IntsToStr:
2024-04-07 09:21:42 I snapshot: 13 -2139062272 80808000 m_Skin5=-2139062272 IntsToStr:
2024-04-07 09:21:42 I snapshot: 14 0 00000000 m_UseCustomColor=0 (min=0 max=1)
2024-04-07 09:21:42 I snapshot: 15 7199301 006dda45 m_ColorBody=7199301
2024-04-07 09:21:42 I snapshot: 16 2345678 0023cace m_ColorFeet=2345678
2024-04-07 09:21:42 I snapshot: PlayerInfo type=10 id=0 size=20
2024-04-07 09:21:42 I snapshot: 0 1 00000001 m_Local=1 (min=0 max=1)
2024-04-07 09:21:42 I snapshot: 1 0 00000000 m_ClientId=0 (min=0 max=MAX_CLIENTS-1(63))
2024-04-07 09:21:42 I snapshot: 2 0 00000000 m_Team=0 (min=TEAM_SPECTATORS(-1) max=TEAM_BLUE(1))
2024-04-07 09:21:42 I snapshot: 3 -9999 ffffd8f1 m_Score=-9999
2024-04-07 09:21:42 I snapshot: 4 0 00000000 m_Latency=0
2024-04-07 09:21:42 I snapshot: (out of range) type=32766 id=0 size=8
2024-04-07 09:21:42 I snapshot: 0 1 00000001
2024-04-07 09:21:42 I snapshot: 1 0 00000000
2024-04-07 09:21:42 I snapshot: Character type=9 id=0 size=88
2024-04-07 09:21:42 I snapshot: 0 176 000000b0 m_Tick=176
2024-04-07 09:21:42 I snapshot: 1 1968 000007b0 m_X=1968
2024-04-07 09:21:42 I snapshot: 2 913 00000391 m_Y=913
2024-04-07 09:21:42 I snapshot: 3 0 00000000 m_VelX=0
2024-04-07 09:21:42 I snapshot: 4 0 00000000 m_VelY=0
2024-04-07 09:21:42 I snapshot: 5 0 00000000 m_Angle=0
2024-04-07 09:21:42 I snapshot: 6 0 00000000 m_Direction=0 (min=-1 max=1)
2024-04-07 09:21:42 I snapshot: 7 0 00000000 m_Jumped=0 (min=0 max=3)
2024-04-07 09:21:42 I snapshot: 8 -1 ffffffff m_HookedPlayer=-1 (min=-1 max=MAX_CLIENTS-1(63))
2024-04-07 09:21:42 I snapshot: 9 0 00000000 m_HookState=0 (min=-1 max=5)
2024-04-07 09:21:42 I snapshot: 10 0 00000000 m_HookTick=0 (NetTick)
2024-04-07 09:21:42 I snapshot: 11 1968 000007b0 m_HookX=1968
2024-04-07 09:21:42 I snapshot: 12 913 00000391 m_HookY=913
2024-04-07 09:21:42 I snapshot: 13 0 00000000 m_HookDx=0
2024-04-07 09:21:42 I snapshot: 14 0 00000000 m_HookDy=0
2024-04-07 09:21:42 I snapshot: 15 1 00000001 m_PlayerFlags=1 (min=0 max=256)
2024-04-07 09:21:42 I snapshot: 16 10 0000000a m_Health=10 (min=0 max=10)
2024-04-07 09:21:42 I snapshot: 17 10 0000000a m_Armor=10 (min=0 max=10)
2024-04-07 09:21:42 I snapshot: 18 0 00000000 m_AmmoCount=0 (min=0 max=10)
2024-04-07 09:21:42 I snapshot: 19 1 00000001 m_Weapon=1 (min=0 max=NUM_WEAPONS-1(5))
2024-04-07 09:21:42 I snapshot: 20 5 00000005 m_Emote=5 (min=0 max=6)
2024-04-07 09:21:42 I snapshot: 21 0 00000000 m_AttackTick=0 (min=0 max=max_int(2147483647))
2024-04-07 09:21:42 I snapshot: (out of range) type=32765 id=0 size=40
2024-04-07 09:21:42 I snapshot: 0 49152 0000c000
2024-04-07 09:21:42 I snapshot: 1 0 00000000
2024-04-07 09:21:42 I snapshot: 2 2 00000002
2024-04-07 09:21:42 I snapshot: 3 0 00000000
2024-04-07 09:21:42 I snapshot: 4 0 00000000
2024-04-07 09:21:42 I snapshot: 5 0 00000000
2024-04-07 09:21:42 I snapshot: 6 0 00000000
2024-04-07 09:21:42 I snapshot: 7 0 00000000
2024-04-07 09:21:42 I snapshot: 8 1 00000001
2024-04-07 09:21:42 I snapshot: 9 0 00000000
```
2024-09-07 15:28:25 +08:00
furo
32fcd2a7e8
Change type of m_HookTick
to NetIntAny
2024-04-13 17:02:18 +02:00
heinrich5991
17402cc43f
Rename all variables for strict camel-casing of abbreviations
...
This is the strict version, ID → Id, UI → Ui, except DDNet which stays
DDNet.
This would fix #7750 .
Done using a naive rename script (for bash, use `shopt -s globstar`):
```fish
sed -i \
-e 's/\([a-z]_\?\)ID/\1Id/g' \
-e 's/\([^ ]\)\<UI\>/\1Ui/g' \
-e 's/UI()/Ui()/g' \
-e 's/\<CUI\>/CUi/g' \
-e 's/\([\ta-z.(&]\|[,=|] \)ID\>/\1Id/g' \
-e 's/\<ID\>\([^ ").]\)/Id\1/g' \
-e 's/\<ID\([0-9]\)/Id\1/g' \
-e 's/\<ID\>\( [<=>:+*/-]\)/Id\1/g' \
-e 's/int ID/int Id/g' \
-e 's/\([a-z]_\?\)GPU/\1Gpu/g' \
-e 's/\([a-z]_\?\)IP/\1Ip/g' \
-e 's/\([a-z]_\?\)CID/\1Cid/g' \
-e 's/\([a-z]_\?\)MySQL/\1Mysql/g' \
-e 's/MySql/Mysql/g' \
-e 's/\([a-xz]_\?\)SQL/\1Sql/g' \
-e 's/DPMode/DpMode/g' \
-e 's/TTWGraphics/TTwGraphics/g' \
\
-e 's/Ipointer/IPointer/g' \
-e 's/\.vendorId/.vendorID/g' \
-e 's/\.windowId/.windowID/g' \
-e 's/SDL_GetWindowFromId/SDL_GetWindowFromID/g' \
-e 's/SDL_AudioDeviceId/SDL_AudioDeviceID/g' \
-e 's/SDL_JoystickId/SDL_JoystickID/g' \
-e 's/SDL_JoystickInstanceId/SDL_JoystickInstanceID/g' \
-e 's/AVCodecId/AVCodecID/g' \
src/**/*.cpp src/**/*.h {datasrc,scripts}/**/*.py
git checkout -- src/engine/external
```
I like this option because it presents clear rules.
Still needs fixups because of the naive replacement, I'd do this if we
want this merged.
2024-03-05 15:44:09 +01:00
ChillerDragon
e25b943cfb
Fix 0.7 validation range of m_HookedPlayer in character snap items
...
Co-authored-by: Redix <redix@hotmail.de>
2024-01-30 12:46:33 +08:00
heinrich5991
d3123a479b
Refactor code around inherited net objects, add it to 0.7 code
2024-01-06 22:46:57 +01:00
heinrich5991
be53d83019
Remove #include <system.h>
from one more header
2023-12-12 00:44:46 +01:00
Alexander Akulich
b6470e5a43
Use client 'six' data structs for client 'seven' data
2023-10-06 18:14:38 +03:00
Alexander Akulich
487f0541b4
datasrc: Change 'seven' CDataSound m_Id type to int
to match 'six'
2023-10-06 17:39:21 +03:00
ChillerDragon
87640d7857
NETMSG_AUTH_CHALLENGE is not used in 0.6 or 0.7
2023-08-22 10:31:16 +02:00
Alexander Akulich
2ad5c020e0
Add a simpler IServer::SnapNewItem() API based on some more generated data
2023-02-10 23:12:24 +03:00
Dennis Felsing
06a971bcd1
Fix rest of pylint manually
2022-07-27 09:37:25 +02:00
Dennis Felsing
9f8e97fbeb
Run flynt -a
2022-07-27 09:37:24 +02:00
Robert Müller
ba1608529e
Move message copy inside SendPackMsgTranslate
...
Fix clang warning: Address of stack memory associated with local variable 'aBuf' is still referred to by the stack variable 'tmp' upon returning to the caller. This will be a dangling reference [clang-analyzer-core.StackAddressEscape]
Mark the input parameters as const pointers and mark the protocol message `Pack` methods as const.
2022-07-11 19:02:16 +02:00
Chairn
a69dc599a9
Huge variable naming format
...
Fix pointer and pointer array variable naming
Huge renaming to match our rules
Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)[^a]\w+\[
(?!(return|delete)\b)\b\w+ (?!(m_|ms_|g_|gs_|s_))[^a]\w+\[
Further format static variables
Format almost all pointer names accordingly
Used regex: (?!(return)\b)\b\w+
\*(?!(m_p|p|s_p|m_ap|s_ap|g_p|g_ap|ap|gs_ap|ms_ap|gs_p|ms_p))\w+\b[^:\(p]
clang-format
Fix CI fail
Fix misnamed non pointer as pointer and non array as array
Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)p\w+\b
(?!return\b)\b\w+ (ms_|m_|g_|gs_|s_)a\w+\b[^\[]
clang-format
Revert to SCREAMING_SNAKE_CASE and reinstate dead code
2022-07-08 18:01:29 +02:00
Robert Müller
0a4b1b9a7b
Organize generated protocol includes
2022-06-17 17:39:24 +02:00
ChillerDragon
3667061b68
Use nullptr in generated and editor
...
-Wzero-as-null-pointer-constant
2022-06-13 18:28:13 +02:00
Robert Müller
8f260caa9f
Remove duplicated includes from generated protocol
2022-05-29 13:49:44 +02:00
heinrich5991
0d916e2ef6
Remove F-Client-specific messages
...
The PLAYERFLAG_AIM can now be set directly on DDNet servers via the 0.7
bridge and will be sent to clients identifying themselves as DDNet
clients.
Add a new extended message that mirror the old `Sv_TeamsState`.
2021-01-12 01:38:23 +01:00
def
13a8dfa307
Add pylint
...
and fix occurences
2020-12-09 10:40:28 +01:00
Jupeyy
95824b24a3
Fix weapon muzzle texture cutoff
2020-10-25 15:40:22 +01:00
Jupeyy
8d6148b20b
Modulize skins, particles, emoticons and game
2020-10-09 09:07:19 +02:00
def
343e30f7a6
Fix protocol.h/protocol7.h to compile on their own ( fixes #2962 in another way)
2020-10-02 19:28:08 +02:00
Learath
d3ac9a69eb
Address C++14 defect(CWG1558)
2020-06-30 21:34:23 +03:00
Learath
9e2434c65d
Better skin colors. Better game message translation
2020-06-19 20:28:55 +03:00
def
ef4cad9f4d
Fix Python
2020-06-19 20:27:15 +03:00
Learath
807c92f1a4
Generate the 0.7 protocol
2020-06-19 20:27:15 +03:00