five-on-it / packages/protocol/src/messages / EntitySnapshot
Interface: EntitySnapshot
Defined in: packages/protocol/src/messages.ts:148
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:265
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:190
Where a character aims (rad); where a vehicle's water jet sprays (the simulation's jets.ts).
alert
alert:
number
Defined in: packages/protocol/src/messages.ts:240
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:274
A character's body armour left (the simulation's gear.ts), 0 to 200.
boost
boost:
number
Defined in: packages/protocol/src/messages.ts:178
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:180
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:230
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:196
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:210
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:204
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:206
The character's cover is low (hidden means crouching).
coverYaw
coverYaw:
number
Defined in: packages/protocol/src/messages.ts:208
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:224
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:194
A character lying knocked down (a tumbling box).
eid
eid:
number
Defined in: packages/protocol/src/messages.ts:150
Server-side entity id.
exploded
exploded:
boolean
Defined in: packages/protocol/src/messages.ts:232
A vehicle that has blown up: a charred wreck.
fuelled
fuelled:
boolean
Defined in: packages/protocol/src/messages.ts:228
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:276
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:272
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:257
A player's character just back from lying dead: a ghost for a few seconds, passing through cars and people, taking no harm.
gripFront
gripFront:
number
Defined in: packages/protocol/src/messages.ts:184
Side grip of the front axle, 0..1 (0 for a character).
gripRear
gripRear:
number
Defined in: packages/protocol/src/messages.ts:186
Side grip of the rear axle, 0..1 (0 for a character).
handbrake
handbrake:
boolean
Defined in: packages/protocol/src/messages.ts:174
Handbrake held.
health
health:
number
Defined in: packages/protocol/src/messages.ts:202
Hit points left: a character's, a vehicle's (a trailer carries its tractor's), a flyer's; 0 = dead, wrecked or shot down.
hostile
hostile:
boolean
Defined in: packages/protocol/src/messages.ts:212
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:198
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).
invincible
invincible:
boolean
Defined in: packages/protocol/src/messages.ts:214
A character that shrugs off every hit (the infinite-health switch).
jacking
jacking:
boolean
Defined in: packages/protocol/src/messages.ts:216
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:152
What it is.
landing
landing:
number
Defined in: packages/protocol/src/messages.ts:182
Seconds of dulled control left after a hard landing (0 for a character).
locked
locked:
boolean
Defined in: packages/protocol/src/messages.ts:242
A locked vehicle.
masked
masked:
boolean
Defined in: packages/protocol/src/messages.ts:278
A character wearing a gas mask.
owner
owner:
number
Defined in: packages/protocol/src/messages.ts:168
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:251
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:249
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:253
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:222
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:218
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:170
Authoritative pose (a seated character carries its vehicle's).
pursuit
pursuit:
boolean
Defined in: packages/protocol/src/messages.ts:255
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:282
A character with an adrenaline shot in it: faster, stun-proof.
seat
seat:
number
Defined in: packages/protocol/src/messages.ts:200
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:220
A vehicle whose siren wails.
sitting
sitting:
boolean
Defined in: packages/protocol/src/messages.ts:226
A character sitting on a seat of the level (the simulation's sitting.ts).
spraying
spraying:
boolean
Defined in: packages/protocol/src/messages.ts:267
A vehicle whose water jet sprays (the simulation's jets.ts), toward its aim.
stalled
stalled:
boolean
Defined in: packages/protocol/src/messages.ts:284
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:234
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:172
Smoothed steering in [-1, 1] (for the wheel sprites); 0 for characters.
suited
suited:
boolean
Defined in: packages/protocol/src/messages.ts:280
A character in the juggernaut suit.
tyres
tyres:
number
Defined in: packages/protocol/src/messages.ts:188
Bitmask of flat tyres, bit i = wheel i (vehicles and trailers).
weapon
weapon:
number
Defined in: packages/protocol/src/messages.ts:192
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:176
Bitmask of wheels touching the ground (bit i = wheel i); for a character, bit 0 = standing.