five-on-it / packages/protocol/src/messages / EntitySnapshot
Interface: EntitySnapshot
Defined in: packages/protocol/src/messages.ts:149
One replicated entity inside a snapshot: a vehicle, a trailer, a character, a projectile, a light piece of the level lying loose, a door of the level, items lying on the ground (item), a container (a crate, a locker), a terminal (a kiosk, a keypad, an ATM, a vending machine), a security camera of the level, a nail strip laid on a road (nails, its pose turned to the heading it stops), a device, something that flies (flyer: the police's drone, its class in cls, its state in seat, its hit points in health) or a zone (a cloud of tear gas or smoke, a patch of foam, a ground fire: its centre on the ground).
Properties
act
act:
number
Defined in: packages/protocol/src/messages.ts:266
What a character on foot does with its hands, for the renderers (the simulation's actByte): the act's index in its ACTS in the low six bits (a shot, a punch, a pickup, a door, the phone out, a lock picked, a bomb planted…), a counter of its acts in the high two; seated, a shot from the seat only (seatedActByte); the ticks left of a vehicle's nitro burn; 0 for anything else.
aim
aim:
number
Defined in: packages/protocol/src/messages.ts:191
Where a character aims (rad); where a vehicle's water jet sprays (the simulation's jets.ts); which way a flyer's searchlight's pool is from under it (rad).
alert
alert:
number
Defined in: packages/protocol/src/messages.ts:241
An NPC's alert (stealth: GAME_DESIGN §8): 0 for none (a player, a pedestrian, a chaser), else 1 + its phase's rank: 1 normal, 2 caution, 3 suspicious ("?"), 4 search, 5 alert ("!"); the ticks a vehicle on run-flats limps.
armour
armour:
number
Defined in: packages/protocol/src/messages.ts:275
A character's body armour left (the simulation's gear.ts), 0 to 200; a flyer's searchlight's hit points (0 shot out, or none).
boost
boost:
number
Defined in: packages/protocol/src/messages.ts:179
Boost meter, 0..1; for a character, how far its hold is along (a lock picked, a device worked), 0..1.
boostSpent
boostSpent:
boolean
Defined in: packages/protocol/src/messages.ts:181
The boost ran its meter dry while still held and waits for a new double tap.
burning
burning:
boolean
Defined in: packages/protocol/src/messages.ts:231
A vehicle on fire: burning toward its blast, or its wreck still burning after it (the simulation's fire.ts).
cls
cls:
number
Defined in: packages/protocol/src/messages.ts:197
Index of the car's class in the simulation's class table (size, drivetrain, tuning); a trailer carries its tractor's; for a character, a pedestrian's role (the simulation's PEDESTRIAN_ROLES, 0 for anyone else; the last of them, its DOG_ROLE, is a dog, in a dog's body) or, from the simulation's ROLE_CLS_BASE up, a character's role (a contact who talks); an item's index in the room's items (the welcome's); a container's, a terminal's or a device's kind (the simulation's DEVICE_KINDS); a door's lock (1 a key's, 2 a keypad's); a camera's state (0 on, 1 off, 2 destroyed); a flyer's class (the simulation's FLYER_CLASSES); a laid strip's kind (0 nails, 1 an oil slick); a zone's kind (the simulation's ZONE_KINDS: tear gas, smoke, foam, a ground fire).
cooking
cooking:
number
Defined in: packages/protocol/src/messages.ts:211
Ticks a character has held a grenade with its pin out (0 = none): the fuse runs from there; a vehicle's nitro charges (low four bits) and dispenser charges (high four: the simulation's kitByte).
cover
cover:
number
Defined in: packages/protocol/src/messages.ts:205
A character's cover: 0 in the open, 1 hidden behind it, 2 popped up out of it; a vehicle's rear dispenser (the simulation's DISPENSERS: 0 none, 1 caltrops, 2 oil).
coverLow
coverLow:
boolean
Defined in: packages/protocol/src/messages.ts:207
The character's cover is low (hidden means crouching).
coverYaw
coverYaw:
number
Defined in: packages/protocol/src/messages.ts:209
Direction into the character's cover (rad, 0 faces +z): what it is pressed against.
dormant
dormant:
boolean
Defined in: packages/protocol/src/messages.ts:225
A parked vehicle that dozes (the simulation's dormant.ts): held still until something touches it, hurts it or gets in.
down
down:
boolean
Defined in: packages/protocol/src/messages.ts:195
A character lying knocked down (a tumbling box).
eid
eid:
number
Defined in: packages/protocol/src/messages.ts:151
Server-side entity id.
exploded
exploded:
boolean
Defined in: packages/protocol/src/messages.ts:233
A vehicle that has blown up: a charred wreck.
fuelled
fuelled:
boolean
Defined in: packages/protocol/src/messages.ts:229
A vehicle filled up at a pump, its boost recharging twice as fast (the simulation's fuel.ts).
gassed
gassed:
boolean
Defined in: packages/protocol/src/messages.ts:277
A character gassed (the simulation's zones.ts): coughing, its aim swaying, its player's screen blurred.
gen
gen:
number
Defined in: packages/protocol/src/messages.ts:273
Its life under its id (eight bits, wrapping): the simulation turns it over whenever an id is freed, so an entity made under a freed id is told apart from the one before it.
ghost
ghost:
boolean
Defined in: packages/protocol/src/messages.ts:258
A player's character just back from lying dead: a ghost for a few seconds, passing through cars and people, taking no harm.
grappler
grappler:
boolean
Defined in: packages/protocol/src/messages.ts:289
A police cruiser with the Grappler's bumper net (the simulation's grappler.ts).
gripFront
gripFront:
number
Defined in: packages/protocol/src/messages.ts:185
Side grip of the front axle, 0..1 (0 for a character).
gripRear
gripRear:
number
Defined in: packages/protocol/src/messages.ts:187
Side grip of the rear axle, 0..1 (0 for a character).
handbrake
handbrake:
boolean
Defined in: packages/protocol/src/messages.ts:175
Handbrake held.
health
health:
number
Defined in: packages/protocol/src/messages.ts:203
Hit points left: a character's, a vehicle's (a trailer carries its tractor's), a flyer's; 0 = dead, wrecked or shot down.
hooked
hooked:
boolean
Defined in: packages/protocol/src/messages.ts:291
A vehicle a Grappler's net holds by a rear wheel, dragged to a stop.
hostile
hostile:
boolean
Defined in: packages/protocol/src/messages.ts:213
A character that is an enemy NPC (a chaser), drawn in its own colour; never a player or a pedestrian.
inside
inside:
number
Defined in: packages/protocol/src/messages.ts:199
For a character: the entity id of the vehicle it sits in, or NOT_INSIDE; for a trailer: its tractor; for a vehicle with a water jet, its tank in thousandths (else NOT_INSIDE); for a loose piece (prop): its placement's index in the level; a door's or a camera's index in the level; how many an item is; a nail strip's length (cm); an armed bomb's seconds left, a fuse box's reach (m); a zone's reach now (cm); how far out over the ground a flyer's searchlight's pool is (dm; NOT_INSIDE off, shot out or none).
invincible
invincible:
boolean
Defined in: packages/protocol/src/messages.ts:215
A character that shrugs off every hit (the infinite-health switch).
jacking
jacking:
boolean
Defined in: packages/protocol/src/messages.ts:217
A character in a carjack's beat: it pulled a driver out and is about to take the wheel.
kind
kind:
"prop"|"door"|"item"|"vehicle"|"container"|"camera"|"trailer"|"device"|"terminal"|"character"|"projectile"|"nails"|"flyer"|"zone"
Defined in: packages/protocol/src/messages.ts:153
What it is.
landing
landing:
number
Defined in: packages/protocol/src/messages.ts:183
Seconds of dulled control left after a hard landing (0 for a character).
locked
locked:
boolean
Defined in: packages/protocol/src/messages.ts:243
A locked vehicle.
masked
masked:
boolean
Defined in: packages/protocol/src/messages.ts:279
A character wearing a gas mask.
owner
owner:
number
Defined in: packages/protocol/src/messages.ts:169
Client id of the player controlling it: a character's player, a vehicle's driver (0 = nobody).
ownerId
ownerId:
number
Defined in: packages/protocol/src/messages.ts:252
Which one: a player's client id, an NPC's entity id; a dog's walker's entity id, a dog walker's dog's; 0 otherwise.
ownerKind
ownerKind:
number
Defined in: packages/protocol/src/messages.ts:250
Who owns a vehicle, by the simulation's OWNER_KINDS: 0 nobody, 1 a player, 2 an NPC, 3 a mission. For a dog and for a dog walker, their lead (the simulation's leadWire, read back by its decodeLead): what the dog does in the low four bits, whether it is on its lead (0x10) and whether ownerId names the other end of it (0x20).
paint
paint:
number
Defined in: packages/protocol/src/messages.ts:254
A vehicle's paint: 0 its own colour, 1 and up a respray's; what a character on foot holds (the simulation's HANDHELD_LOOKS: a look's index plus one, 0 none).
parked
parked:
boolean
Defined in: packages/protocol/src/messages.ts:223
A vehicle on its parking brake: nobody has driven it since it was spawned or left.
police
police:
boolean
Defined in: packages/protocol/src/messages.ts:219
A character that is a police officer, drawn as police; never a player. A flyer of the police's.
pose
pose:
Pose
Defined in: packages/protocol/src/messages.ts:171
Authoritative pose (a seated character carries its vehicle's).
pressure
pressure:
boolean
Defined in: packages/protocol/src/messages.ts:293
A vehicle whose water jet builds its pressure (a hiss), the water about to come (the simulation's jets.ts).
pursuit
pursuit:
boolean
Defined in: packages/protocol/src/messages.ts:256
A vehicle with the pursuit tune: an interceptor's engine (the police's faster cars at three stars).
rushing
rushing:
boolean
Defined in: packages/protocol/src/messages.ts:283
A character with an adrenaline shot in it: faster, stun-proof.
seat
seat:
number
Defined in: packages/protocol/src/messages.ts:201
For a seated character: its seat (0 = driver); a door's opening (0 shut, 1 or 2 swung either way); a container's lock (1 locked, 2 a safe still shut); a terminal's verb (0 use, 1 hack); a device's state (the simulation's DEVICE_STATES); a boat's flood (0 afloat to 255 gone under, the simulation's boat.ts); a flyer's state (the simulation's FLYER_STATES: flying, down, a wreck); a zone's seconds left.
siren
siren:
boolean
Defined in: packages/protocol/src/messages.ts:221
A vehicle whose siren wails.
sitting
sitting:
boolean
Defined in: packages/protocol/src/messages.ts:227
A character sitting on a seat of the level (the simulation's sitting.ts).
spraying
spraying:
boolean
Defined in: packages/protocol/src/messages.ts:268
A vehicle whose water jet sprays (the simulation's jets.ts), toward its aim.
stalled
stalled:
boolean
Defined in: packages/protocol/src/messages.ts:285
A vehicle whose engine an EMP's pulse killed for a while (the simulation's ordnance.ts).
status
status:
number
Defined in: packages/protocol/src/messages.ts:235
A character's status (the simulation's STATUSES): 0 awake, 1 stunned, 2 knocked out, 3 asleep, 4 down, 5 dead; the ticks a vehicle's tyres stay oiled.
steer
steer:
number
Defined in: packages/protocol/src/messages.ts:173
Smoothed steering in [-1, 1] (for the wheel sprites); 0 for characters.
suited
suited:
boolean
Defined in: packages/protocol/src/messages.ts:281
A character in the juggernaut suit.
tracked
tracked:
boolean
Defined in: packages/protocol/src/messages.ts:287
A vehicle with a police GPS tag stuck on it (the simulation's tracking.ts): the police know where it is.
tyres
tyres:
number
Defined in: packages/protocol/src/messages.ts:189
Bitmask of flat tyres, bit i = wheel i (vehicles and trailers).
weapon
weapon:
number
Defined in: packages/protocol/src/messages.ts:193
The weapon a character holds (its selected slot's); a projectile's weapon; a vehicle's upgrades (the simulation's MOD bits: run-flats, a bull bar, armour plating).
wheelContact
wheelContact:
number
Defined in: packages/protocol/src/messages.ts:177
Bitmask of wheels touching the ground (bit i = wheel i); for a character, bit 0 = standing.