Skip to content

Snap Items

This page describes the snap items structure, all kinds of snap items, and their purpose.

Item IDName
0Unused
1Unused
2NETOBJTYPE_PROJECTILE
3NETOBJTYPE_LASER
4NETOBJTYPE_PICKUP
5NETOBJTYPE_FLAG
6NETOBJTYPE_GAMEINFO
7NETOBJTYPE_GAMEDATA
8Unused
9NETOBJTYPE_CHARACTER
10NETOBJTYPE_PLAYERINFO
11NETOBJTYPE_CLIENTINFO
12NETOBJTYPE_SPECTATORINFO
13Unused
14NETEVENTTYPE_EXPLOSION
15NETEVENTTYPE_SPAWN
16NETEVENTTYPE_HAMMERHIT
17NETEVENTTYPE_DEATH
18NETEVENTTYPE_SOUNDGLOBAL (DDNet Only)
19NETEVENTTYPE_SOUNDWORLD
20NETEVENTTYPE_DAMAGEIND

2 - NETOBJTYPE_PROJECTILE

This item represents a projectile entity (bullet, grenade, or shotgun pellet) in the game world. Structure:

FieldTypeDescription
XIntegerProjectile X position in the world.
YIntegerProjectile Y position in the world.
VelocityXIntegerHorizontal velocity of the projectile, scaled by 100.
VelocityYIntegerVertical velocity of the projectile, scaled by 100.
TypeIntegerWeapon type that fired this projectile: 1 = gun, 2 = shotgun, 3 = grenade.
StartTickIntegerGame tick at which the projectile was created. Used by the client to compute its current position using physics formulas.

3 - NETOBJTYPE_LASER

This item represents a laser beam in the game world. Structure:

FieldTypeDescription
XIntegerLaser endpoint X position.
YIntegerLaser endpoint Y position.
FromXIntegerLaser origin X position (where the tee fired from).
FromYIntegerLaser origin Y position (where the tee fired from).
StartTickIntegerGame tick at which the laser was fired. Used by the client to render the laser beam correctly over time.

4 - NETOBJTYPE_PICKUP

This item represents a pickup (health, armor, or weapon) in the game world. Structure:

FieldTypeDescription
XIntegerPickup X position in the world.
YIntegerPickup Y position in the world.
TypeIntegerPickup type: 0 = health, 1 = armor, 2 = grenade, 3 = shotgun, 4 = laser, 5 = ninja, 6 = gun, 7 = hammer.

5 - NETOBJTYPE_FLAG

This item represents a CTF flag in the game world. Structure:

FieldTypeDescription
XIntegerFlag X position in the world.
YIntegerFlag Y position in the world.
TeamIntegerFlag team: 0 = red team flag, 1 = blue team flag.

6 - NETOBJTYPE_GAMEINFO

This item contains game information about team scores and flag carriers for CTF mode. Structure:

FieldTypeDescription
TeamScoreRedIntegerCurrent score of the red team.
TeamScoreBlueIntegerCurrent score of the blue team.
FlagCarrierRedIntegerClient ID of the red flag carrier, or -3 if lost, -2 if at base, -1 if taken.
FlagCarrierBlueIntegerClient ID of the blue flag carrier, or -3 if lost, -2 if at base, -1 if taken.

7 - NETOBJTYPE_GAMEDATA

This item contains global game state data. Structure:

FieldTypeDescription
GameFlagsIntegerGame mode flags (bitmask): 1 = teams mode, 2 = CTF flags enabled, 4 = survival mode, 8 = race mode.
GameStateFlagsIntegerGame state flags (bitmask): 1 = warmup, 2 = sudden death, 4 = round over, 8 = game over, 16 = paused, 32 = start countdown.
RoundStartTickIntegerGame tick when the current round started.
WarmupTimerIntegerRemaining warmup time, or a special value indicating the game state.
ScoreLimitIntegerScore limit for the current match.
TimeLimitIntegerTime limit for the current match.
RoundNumIntegerTotal number of rounds in the match.
RoundCurrentIntegerCurrent round number (1 based).

9 - NETOBJTYPE_CHARACTER

This item represents a character (tee) in the game world, including its core physics and state. Structure:

FieldTypeDescription
Core -> TickIntegerThe game tick at which the core data was recorded, for dead reckoning purposes.
Core -> XIntegerCore X position in the world.
Core -> YIntegerCore Y position in the world.
Core -> VelXIntegerCore horizontal velocity.
Core -> VelYIntegerCore vertical velocity.
Core -> AngleIntegerCore rotation angle, used for character rendering and aiming.
Core -> DirectionIntegerCore movement direction: -1 = left, 0 = neutral, 1 = right.
Core -> JumpedIntegerCore jump counter: 0 = grounded, 1 = ground jumped, 2 = air jumped, 3 = both used.
Core -> HookedPlayerIntegerClient ID of the player this tee is hooking, or -1 if not hooking a player.
Core -> HookStateIntegerHook state: -1 = idle, 0 = flying, 1 = attached to a non-hookable tile, 2-5 = attached to a hookable tile direction.
Core -> HookTickIntegerGame tick at which the hook state last changed.
Core -> HookXIntegerHook collision X position.
Core -> HookYIntegerHook collision Y position.
Core -> HookDxIntegerHook collision delta X.
Core -> HookDyIntegerHook collision delta Y.
HealthIntegerCurrent health of the character (0-10). Only visible to the owning player and spectators of the owning player.
ArmorIntegerCurrent armor of the character (0-10). Only visible to the owning player and spectators of the owning player.
AmmoCountIntegerAmmunition count for the active weapon. For ninja: remaining ninja duration. Visible only to the owning player and spectators of the owning player.
WeaponIntegerCurrently active weapon: 0 = hammer, 1 = gun, 2 = shotgun, 3 = grenade, 4 = laser, 5 = ninja.
EmoteIntegerCurrent emote: 0 = normal, 1 = pain, 2 = happy, 3 = surprise, 4 = angry, 5 = blink.
AttackTickIntegerGame tick of the last attack, used by the client for attack prediction.
PlayerFlagsIntegerPlayer state flags (bitmask): 1 = admin, 2 = chatting, 4 = scoreboard open, 8 = ready, 16 = dead, 32 = watching.
TriggeredEventsIntegerEvents triggered during this tick (bitmask): 1 = ground jump, 2 = air jump, 4 = hook attached to player, 8 = hook attached to ground, 16 = hook hit non-hookable. Cleared each tick after snap.

10 - NETOBJTYPE_PLAYERINFO

This item contains information about a player's score and latency. Structure:

FieldTypeDescription
LocalIntegerWhether this player is the local client (1 for the client itself, 0 for other players).
ClientIDIntegerClient ID of this player.
TeamIntegerTeam the player is on: -1 = spectators, 0 = red team, 1 = blue team.
ScoreIntegerPlayer's current score.
LatencyIntegerPlayer's current latency/ping in milliseconds.

11 - NETOBJTYPE_CLIENTINFO

This item contains identity and skin information about a client. Structure:

FieldTypeDescription
NameString[16]Player name (packed as integers for snap items).
ClanString[12]Player clan (packed as integers for snap items).
CountryIntegerCountry code for the player.
SkinString[20]Skin name (packed as integers for snap items).
Use Custom ColorIntegerWhether the player uses custom skin colors.
Color BodyIntegerBody color value.
Color FeetIntegerFeet color value.

INFO

Check the String Packing To Snap Items section for more information about the string packing for snap items.

12 - NETOBJTYPE_SPECTATORINFO

This item contains the spectator state of a player. It is only sent to the local spectator (the snapping client itself) when their team is TEAM_SPECTATORS.

Structure:

FieldTypeDescription
SpectatorIDIntegerClient ID being spectated, or -1 (SPEC_FREEVIEW) when in free view mode.
XIntegerSpectator camera X position in the world.
YIntegerSpectator camera Y position in the world.

14 - NETEVENTTYPE_EXPLOSION

This event creates an explosion effect at the given position. It is a transient event that does not persist across snapshots. Structure:

FieldTypeDescription
XIntegerX position of the explosion center in the world.
YIntegerY position of the explosion center in the world.

15 - NETEVENTTYPE_SPAWN

This event creates a spawn effect at the given position when a player respawns. Structure:

FieldTypeDescription
XIntegerX position of the spawn effect in the world.
YIntegerY position of the spawn effect in the world.

16 - NETEVENTTYPE_HAMMERHIT

This event creates a hammer hit effect at the given position. Structure:

FieldTypeDescription
XIntegerX position of the hammer hit effect in the world.
YIntegerY position of the hammer hit effect in the world.

17 - NETEVENTTYPE_DEATH

This event signals a player death at the given position. Structure:

FieldTypeDescription
XIntegerX position of the death event in the world.
YIntegerY position of the death event in the world.
ClientIDIntegerClient ID of the player that died.

18 - NETEVENTTYPE_SOUNDGLOBAL

This event triggers a global sound (not tied to a world position). Structure:

FieldTypeDescription
SoundIDIntegerSound ID to play globally.

19 - NETEVENTTYPE_SOUNDWORLD

This event triggers a world sound at the given position. Structure:

FieldTypeDescription
XIntegerX position of the sound source in the world.
YIntegerY position of the sound source in the world.
SoundIDIntegerSound ID to play at this position.

20 - NETEVENTTYPE_DAMAGEIND

This event creates a damage indicator at the given position, showing damage direction and amount. Structure:

FieldTypeDescription
XIntegerX position of the damage effect in the world.
YIntegerY position of the damage effect in the world.
AngleIntegerAngle of the damage source, used to orient the damage indicator.