List of snap items
Note there is also documentation about snapshots in libtw2.
DDNet is fully compatible with and based on the
teeworlds 0.6 snapshot. So please read that section first.
DDNet extended the snap with new ddnet specific items. Those items have the type id 0 and a high id.
The ddnet client detects the snap items using this line of code in
CSnapshot::FindItem
if(pItemconst CSnapshotItem *pItem = GetItem(i);->Type() == 0 && pItemconst CSnapshotItem *pItem = GetItem(i);->ID() >= OFFSET_UUID_TYPEOFFSET_UUID_TYPE = 0x4000 // 16384) // NETOBJTYPE_EX
The enum OFFSET_UUID_TYPE is set to 0x4000 which is 16384 in decimal.
Meaning the ddnet client will assume every snap item that has a type of zero and an id of higher or equal to 16384
to be a ddnet extension item.
The vanilla teeworlds 0.6 snapshot implementation ignores items with unknown type ids including id zero. So vanilla clients can join ddnet servers just fine without getting any errors during snap parsing.
DDNet snap extension items
- NETOBJTYPE_MYOWNOBJECT
- NETOBJTYPE_DDNETCHARACTER
- NETOBJTYPE_DDNETPLAYER
- NETOBJTYPE_GAMEINFOEX
- NETOBJTYPE_DDRACEPROJECTILE
- NETOBJTYPE_DDNETLASER
- NETOBJTYPE_DDNETPROJECTILE
- NETOBJTYPE_DDNETPICKUP
- NETOBJTYPE_MYOWNEVENT
- NETOBJTYPE_SPECCHAR
- NETOBJTYPE_SWITCHSTATE
- NETOBJTYPE_ENTITYEX